0.4.1 • Published 6 months ago
clob-client-skyip v0.4.1
Polymarket CLOB Client
Typescript client for the Polymarket CLOB
Usage
const host = process.env.CLOB_API_URL || "http://localhost:8080";
const signer = new ethers.Wallet(`${process.env.PK}`);
const creds: ApiKeyCreds = {
key: `${process.env.CLOB_API_KEY}`,
secret: `${process.env.CLOB_SECRET}`,
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
};
// Initialize the clob client
// NOTE: the signer must be approved on the CTFExchange contract
const clobClient = new ClobClient(host, signer, creds);
// Create a buy order for 100 NO for 0.50c
const order = await clobClient.createOrder({
tokenId: "52114319501245915516055106046884209969926127482827954674443846427813813222426",
price: 0.5,
side: Side.Buy,
size: 100,
feeRateBps: "0",
});
// Send it to the server
const resp = await clobClient.postOrder(order);
See examples for more information
0.4.1
6 months ago
0.4.0
6 months ago
0.3.0
6 months ago
0.2.7
6 months ago
0.2.6
6 months ago
0.2.9
6 months ago
0.2.8
6 months ago
0.3.2
6 months ago
0.2.3
6 months ago
0.3.1
6 months ago
0.3.4
6 months ago
0.2.5
6 months ago
0.3.3
6 months ago
0.2.4
6 months ago
0.2.2
7 months ago
0.2.1
7 months ago
0.2.0
7 months ago
0.1.9
7 months ago
0.1.8
7 months ago
0.1.7
7 months ago
0.1.6
7 months ago
0.1.5
7 months ago
0.1.4
7 months ago
0.1.3
7 months ago
0.1.2
7 months ago
0.1.1
7 months ago
0.1.0
7 months ago