-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #92 from Polymarket/feat/markets-endpoints-pagination
Pagination payload on /markets endpoint
- Loading branch information
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { config as dotenvConfig } from "dotenv"; | ||
import { resolve } from "path"; | ||
import { Chain, ClobClient } from "../src"; | ||
|
||
dotenvConfig({ path: resolve(__dirname, "../.env") }); | ||
|
||
async function main() { | ||
const host = process.env.CLOB_API_URL || "http://localhost:8080"; | ||
const chainId = parseInt(`${process.env.CHAIN_ID || Chain.MUMBAI}`) as Chain; | ||
const clobClient = new ClobClient(host, chainId); | ||
|
||
console.log("market", await clobClient.getMarket("condition_id")); | ||
|
||
console.log("markets", await clobClient.getMarkets()); | ||
|
||
console.log("simplified markets", await clobClient.getSimplifiedMarkets()); | ||
|
||
console.log("sampling markets", await clobClient.getSamplingMarkets()); | ||
|
||
console.log("sampling simplified markets", await clobClient.getSamplingSimplifiedMarkets()); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters