0.4.1 • Published 11 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
11 months ago
0.4.0
11 months ago
0.3.0
11 months ago
0.2.7
11 months ago
0.2.6
11 months ago
0.2.9
11 months ago
0.2.8
11 months ago
0.3.2
11 months ago
0.2.3
11 months ago
0.3.1
11 months ago
0.3.4
11 months ago
0.2.5
11 months ago
0.3.3
11 months ago
0.2.4
11 months ago
0.2.2
12 months ago
0.2.1
12 months ago
0.2.0
12 months ago
0.1.9
1 year ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago