@polymarket/clob-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/dist/client.d.ts +12 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +23 -0
- package/dist/client.js.map +1 -0
- package/dist/examples/createApiKey.d.ts +2 -0
- package/dist/examples/createApiKey.d.ts.map +1 -0
- package/dist/examples/createApiKey.js +19 -0
- package/dist/examples/createApiKey.js.map +1 -0
- package/dist/examples/createOrder.d.ts +2 -0
- package/dist/examples/createOrder.d.ts.map +1 -0
- package/dist/examples/createOrder.js +34 -0
- package/dist/examples/createOrder.js.map +1 -0
- package/dist/examples/getApiKeys.d.ts +2 -0
- package/dist/examples/getApiKeys.d.ts.map +1 -0
- package/dist/examples/getApiKeys.js +23 -0
- package/dist/examples/getApiKeys.js.map +1 -0
- package/dist/examples/getOpenOrders.d.ts +2 -0
- package/dist/examples/getOpenOrders.d.ts.map +1 -0
- package/dist/examples/getOpenOrders.js +23 -0
- package/dist/examples/getOpenOrders.js.map +1 -0
- package/dist/examples/getServerTime.d.ts +2 -0
- package/dist/examples/getServerTime.d.ts.map +1 -0
- package/dist/examples/getServerTime.js +11 -0
- package/dist/examples/getServerTime.js.map +1 -0
- package/dist/examples/getTradeHistory.d.ts +2 -0
- package/dist/examples/getTradeHistory.d.ts.map +1 -0
- package/dist/examples/getTradeHistory.js +23 -0
- package/dist/examples/getTradeHistory.js.map +1 -0
- package/dist/examples/marketOrder.d.ts +2 -0
- package/dist/examples/marketOrder.d.ts.map +1 -0
- package/dist/examples/marketOrder.js +42 -0
- package/dist/examples/marketOrder.js.map +1 -0
- package/dist/examples/testMarketBuy.d.ts +2 -0
- package/dist/examples/testMarketBuy.d.ts.map +1 -0
- package/dist/examples/testMarketBuy.js +50 -0
- package/dist/examples/testMarketBuy.js.map +1 -0
- package/dist/examples/testMarketSell.d.ts +2 -0
- package/dist/examples/testMarketSell.d.ts.map +1 -0
- package/dist/examples/testMarketSell.js +50 -0
- package/dist/examples/testMarketSell.js.map +1 -0
- package/dist/examples/testMultiSigMarketBuy.d.ts +2 -0
- package/dist/examples/testMultiSigMarketBuy.d.ts.map +1 -0
- package/dist/examples/testMultiSigMarketBuy.js +52 -0
- package/dist/examples/testMultiSigMarketBuy.js.map +1 -0
- package/dist/examples/testPolyProxyMarketBuy.d.ts +2 -0
- package/dist/examples/testPolyProxyMarketBuy.d.ts.map +1 -0
- package/dist/examples/testPolyProxyMarketBuy.js +52 -0
- package/dist/examples/testPolyProxyMarketBuy.js.map +1 -0
- package/dist/examples/testPolyProxyMarketSell.d.ts +2 -0
- package/dist/examples/testPolyProxyMarketSell.d.ts.map +1 -0
- package/dist/examples/testPolyProxyMarketSell.js +52 -0
- package/dist/examples/testPolyProxyMarketSell.js.map +1 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +16 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/keys.ts/index.d.ts +4 -0
- package/dist/keys.ts/index.d.ts.map +1 -0
- package/dist/keys.ts/index.js +14 -0
- package/dist/keys.ts/index.js.map +1 -0
- package/dist/signing/constants.d.ts +15 -0
- package/dist/signing/constants.d.ts.map +1 -0
- package/dist/signing/constants.js +16 -0
- package/dist/signing/constants.js.map +1 -0
- package/dist/signing/eip712.d.ts +10 -0
- package/dist/signing/eip712.d.ts.map +1 -0
- package/dist/signing/eip712.js +32 -0
- package/dist/signing/eip712.js.map +1 -0
- package/dist/signing/hmac.d.ts +10 -0
- package/dist/signing/hmac.d.ts.map +1 -0
- package/dist/signing/hmac.js +25 -0
- package/dist/signing/hmac.js.map +1 -0
- package/dist/signing/index.d.ts +3 -0
- package/dist/signing/index.d.ts.map +1 -0
- package/dist/signing/index.js +3 -0
- package/dist/signing/index.js.map +1 -0
- package/dist/src/client.d.ts +26 -0
- package/dist/src/client.d.ts.map +1 -0
- package/dist/src/client.js +134 -0
- package/dist/src/client.js.map +1 -0
- package/dist/src/constants.d.ts +2 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +5 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/contracts/index.d.ts +9 -0
- package/dist/src/contracts/index.d.ts.map +1 -0
- package/dist/src/contracts/index.js +21 -0
- package/dist/src/contracts/index.js.map +1 -0
- package/dist/src/endpoints.d.ts +9 -0
- package/dist/src/endpoints.d.ts.map +1 -0
- package/dist/src/endpoints.js +9 -0
- package/dist/src/endpoints.js.map +1 -0
- package/dist/src/errors.d.ts +3 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +3 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/headers/index.d.ts +6 -0
- package/dist/src/headers/index.d.ts.map +1 -0
- package/dist/src/headers/index.js +26 -0
- package/dist/src/headers/index.js.map +1 -0
- package/dist/src/http_helpers/index.d.ts +5 -0
- package/dist/src/http_helpers/index.d.ts.map +1 -0
- package/dist/src/http_helpers/index.js +27 -0
- package/dist/src/http_helpers/index.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/order-builder/builder.d.ts +19 -0
- package/dist/src/order-builder/builder.d.ts.map +1 -0
- package/dist/src/order-builder/builder.js +22 -0
- package/dist/src/order-builder/builder.js.map +1 -0
- package/dist/src/order-builder/constants.d.ts +3 -0
- package/dist/src/order-builder/constants.d.ts.map +1 -0
- package/dist/src/order-builder/constants.js +3 -0
- package/dist/src/order-builder/constants.js.map +1 -0
- package/dist/src/order-builder/helpers.d.ts +15 -0
- package/dist/src/order-builder/helpers.d.ts.map +1 -0
- package/dist/src/order-builder/helpers.js +221 -0
- package/dist/src/order-builder/helpers.js.map +1 -0
- package/dist/src/order-builder/index.d.ts +3 -0
- package/dist/src/order-builder/index.d.ts.map +1 -0
- package/dist/src/order-builder/index.js +3 -0
- package/dist/src/order-builder/index.js.map +1 -0
- package/dist/src/order-builder/utils.d.ts +5 -0
- package/dist/src/order-builder/utils.d.ts.map +1 -0
- package/dist/src/order-builder/utils.js +21 -0
- package/dist/src/order-builder/utils.js.map +1 -0
- package/dist/src/signing/constants.d.ts +15 -0
- package/dist/src/signing/constants.d.ts.map +1 -0
- package/dist/src/signing/constants.js +16 -0
- package/dist/src/signing/constants.js.map +1 -0
- package/dist/src/signing/eip712.d.ts +10 -0
- package/dist/src/signing/eip712.d.ts.map +1 -0
- package/dist/src/signing/eip712.js +32 -0
- package/dist/src/signing/eip712.js.map +1 -0
- package/dist/src/signing/hmac.d.ts +10 -0
- package/dist/src/signing/hmac.d.ts.map +1 -0
- package/dist/src/signing/hmac.js +25 -0
- package/dist/src/signing/hmac.js.map +1 -0
- package/dist/src/signing/index.d.ts +3 -0
- package/dist/src/signing/index.d.ts.map +1 -0
- package/dist/src/signing/index.js +3 -0
- package/dist/src/signing/index.js.map +1 -0
- package/dist/src/types.d.ts +71 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +7 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utilities.d.ts +4 -0
- package/dist/src/utilities.d.ts.map +1 -0
- package/dist/src/utilities.js +37 -0
- package/dist/src/utilities.js.map +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Polymarket CLOB Client
|
|
2
|
+
|
|
3
|
+
This is a Typescript client for the Polymarket CLOB
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
const host = "http://localhost:8080";
|
|
9
|
+
const creds: ApiKeyCreds = {
|
|
10
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
11
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
12
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Initialize the clob client
|
|
16
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
17
|
+
|
|
18
|
+
//Approve the collateral token(USDC)
|
|
19
|
+
|
|
20
|
+
await clobClient.approve();
|
|
21
|
+
|
|
22
|
+
// Create a limit buy order for 100 YES for 0.50c
|
|
23
|
+
const order = await clobClient.createLimitOrder({
|
|
24
|
+
asset: {
|
|
25
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
26
|
+
condition: "YES",
|
|
27
|
+
},
|
|
28
|
+
price: 0.5,
|
|
29
|
+
side: Side.Buy,
|
|
30
|
+
size: 100,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Send it to the server
|
|
34
|
+
const resp = await clobClient.postOrder(order);
|
|
35
|
+
|
|
36
|
+
// Init a market sell of 100 YES tokens
|
|
37
|
+
const marketSell = await clobClient.createMarketOrder({
|
|
38
|
+
asset: {
|
|
39
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
40
|
+
condition: "YES",
|
|
41
|
+
},
|
|
42
|
+
side: Side.Sell,
|
|
43
|
+
size: 100,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
await clobClient.postMarketOrder(marketSell);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
See examples
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Wallet } from "@ethersproject/wallet";
|
|
2
|
+
import { JsonRpcSigner } from "@ethersproject/providers";
|
|
3
|
+
import { ApiKeyCreds } from "./types";
|
|
4
|
+
export declare class ClobClient {
|
|
5
|
+
readonly host: string;
|
|
6
|
+
readonly signer?: Wallet | JsonRpcSigner;
|
|
7
|
+
readonly creds?: ApiKeyCreds;
|
|
8
|
+
constructor(host: string, signer?: Wallet | JsonRpcSigner, creds?: ApiKeyCreds);
|
|
9
|
+
getOk(): Promise<any>;
|
|
10
|
+
getServerTime(): Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,qBAAa,UAAU;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAGzC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;gBAEjB,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE,KAAK,CAAC,EAAE,WAAW;IAcjE,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAIrB,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC;CAkB7C"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { get } from "./helpers";
|
|
2
|
+
export class ClobClient {
|
|
3
|
+
constructor(host, signer, creds) {
|
|
4
|
+
this.host = host;
|
|
5
|
+
if (signer !== undefined) {
|
|
6
|
+
if (signer.provider == null || signer.provider._isProvider) {
|
|
7
|
+
throw new Error("signer not connected to a provider!");
|
|
8
|
+
}
|
|
9
|
+
this.signer = signer;
|
|
10
|
+
}
|
|
11
|
+
if (creds !== undefined) {
|
|
12
|
+
this.creds = creds;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
// Public endpoints
|
|
16
|
+
async getOk() {
|
|
17
|
+
return get(`${this.host}/`);
|
|
18
|
+
}
|
|
19
|
+
async getServerTime() {
|
|
20
|
+
return get(`${this.host}/time`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,OAAO,UAAU;IASnB,YAAY,IAAY,EAAE,MAA+B,EAAE,KAAmB;QAC1E,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,MAAM,KAAK,SAAS,EAAE;YACtB,IAAI,MAAM,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE;gBACxD,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;aAC1D;YACD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;SACxB;QACD,IAAI,KAAK,KAAK,SAAS,EAAE;YACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;IACL,CAAC;IAED,mBAAmB;IACZ,KAAK,CAAC,KAAK;QACd,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,KAAK,CAAC,aAAa;QACtB,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC;IACpC,CAAC;CAgBJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createApiKey.d.ts","sourceRoot":"","sources":["../../examples/createApiKey.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const clobClient = new ClobClient(host, wallet);
|
|
13
|
+
console.log(`Response: `);
|
|
14
|
+
const resp = await clobClient.createApiKey();
|
|
15
|
+
console.log(resp);
|
|
16
|
+
console.log(`Complete!`);
|
|
17
|
+
}
|
|
18
|
+
main();
|
|
19
|
+
//# sourceMappingURL=createApiKey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createApiKey.js","sourceRoot":"","sources":["../../examples/createApiKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/E,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAEhD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,YAAY,EAAE,CAAC;IAC7C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAC7B,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOrder.d.ts","sourceRoot":"","sources":["../../examples/createOrder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const creds = {
|
|
13
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
14
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
15
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
16
|
+
};
|
|
17
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
18
|
+
// Create a buy order for 100 YES for 0.50c
|
|
19
|
+
const order = await clobClient.createLimitOrder({
|
|
20
|
+
asset: {
|
|
21
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
22
|
+
condition: "YES",
|
|
23
|
+
},
|
|
24
|
+
price: 0.5,
|
|
25
|
+
side: Side.BUY,
|
|
26
|
+
size: 100,
|
|
27
|
+
});
|
|
28
|
+
// Send it to the server
|
|
29
|
+
const resp = await clobClient.postLimitOrder(order);
|
|
30
|
+
console.log(resp);
|
|
31
|
+
console.log(`Done!`);
|
|
32
|
+
}
|
|
33
|
+
main();
|
|
34
|
+
//# sourceMappingURL=createOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOrder.js","sourceRoot":"","sources":["../../examples/createOrder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEvD,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/E,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,KAAK,GAAgB;QACvB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEvD,2CAA2C;IAC3C,MAAM,KAAK,GAAG,MAAM,UAAU,CAAC,gBAAgB,CAAC;QAC5C,KAAK,EAAE;YACH,OAAO,EAAE,4CAA4C;YACrD,SAAS,EAAE,KAAK;SACnB;QACD,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,IAAI,CAAC,GAAG;QACd,IAAI,EAAE,GAAG;KACZ,CAAC,CAAC;IAEH,wBAAwB;IACxB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getApiKeys.d.ts","sourceRoot":"","sources":["../../examples/getApiKeys.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const creds = {
|
|
13
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
14
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
15
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
16
|
+
};
|
|
17
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
18
|
+
console.log(`Response: `);
|
|
19
|
+
const resp = await clobClient.getApiKeys();
|
|
20
|
+
console.log(resp);
|
|
21
|
+
}
|
|
22
|
+
main();
|
|
23
|
+
//# sourceMappingURL=getApiKeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getApiKeys.js","sourceRoot":"","sources":["../../examples/getApiKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEjD,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/E,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,KAAK,GAAgB;QACvB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEvD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,UAAU,EAAE,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOpenOrders.d.ts","sourceRoot":"","sources":["../../examples/getOpenOrders.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const creds = {
|
|
13
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
14
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
15
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
16
|
+
};
|
|
17
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
18
|
+
const resp = await clobClient.getOpenOrders();
|
|
19
|
+
console.log(resp);
|
|
20
|
+
console.log(`Done!`);
|
|
21
|
+
}
|
|
22
|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AAC,aAAa,EAAE,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServerTime.d.ts","sourceRoot":"","sources":["../../examples/getServerTime.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { config as dotenvConfig } from "dotenv";
|
|
2
|
+
import { resolve } from "path";
|
|
3
|
+
import { ClobClient } from "../src";
|
|
4
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
5
|
+
async function main() {
|
|
6
|
+
const host = "http://localhost:8080";
|
|
7
|
+
const clobClient = new ClobClient(host);
|
|
8
|
+
console.log(`Server time: ${await clobClient.getServerTime()}`);
|
|
9
|
+
}
|
|
10
|
+
main();
|
|
11
|
+
//# sourceMappingURL=getServerTime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getServerTime.js","sourceRoot":"","sources":["../../examples/getServerTime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,IAAI;IACf,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAExC,OAAO,CAAC,GAAG,CAAC,gBAAgB,MAAM,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AACpE,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTradeHistory.d.ts","sourceRoot":"","sources":["../../examples/getTradeHistory.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const creds = {
|
|
13
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
14
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
15
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
16
|
+
};
|
|
17
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
18
|
+
console.log(`Response: `);
|
|
19
|
+
const resp = await clobClient.getTradeHistory();
|
|
20
|
+
console.log(resp);
|
|
21
|
+
}
|
|
22
|
+
main();
|
|
23
|
+
//# sourceMappingURL=getTradeHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTradeHistory.js","sourceRoot":"","sources":["../../examples/getTradeHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEjD,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC/E,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,KAAK,GAAgB;QACvB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAEvD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1B,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,eAAe,EAAE,CAAC;IAChD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketOrder.d.ts","sourceRoot":"","sources":["../../examples/marketOrder.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function main() {
|
|
7
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
8
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
9
|
+
const wallet = pk.connect(provider);
|
|
10
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
11
|
+
const host = "http://localhost:8080";
|
|
12
|
+
const creds = {
|
|
13
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
14
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
15
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
16
|
+
};
|
|
17
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
18
|
+
// Create a market sell order for 150 YES tokens
|
|
19
|
+
const order = await clobClient.createMarketOrder({
|
|
20
|
+
asset: {
|
|
21
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
22
|
+
condition: "YES",
|
|
23
|
+
},
|
|
24
|
+
side: Side.SELL,
|
|
25
|
+
size: 150,
|
|
26
|
+
});
|
|
27
|
+
// const order = await clobClient.createMarketOrder({
|
|
28
|
+
// asset: {
|
|
29
|
+
// address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
30
|
+
// condition: "YES",
|
|
31
|
+
// },
|
|
32
|
+
// side: Side.BUY,
|
|
33
|
+
// size: 150,
|
|
34
|
+
// type: OrderType.MARKET,
|
|
35
|
+
// });
|
|
36
|
+
// Send it to the server
|
|
37
|
+
const resp = await clobClient.postMarketOrder(order);
|
|
38
|
+
console.log(resp);
|
|
39
|
+
console.log(`Done!`);
|
|
40
|
+
}
|
|
41
|
+
main();
|
|
42
|
+
//# sourceMappingURL=marketOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketOrder.js","sourceRoot":"","sources":["../../examples/marketOrder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,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AG;KACZ,CAAC,CAAC;IAEH,qDAAqD;IACrD,eAAe;IACf,iEAAiE;IACjE,4BAA4B;IAC5B,SAAS;IACT,sBAAsB;IACtB,iBAAiB;IACjB,8BAA8B;IAC9B,MAAM;IAEN,wBAAwB;IACxB,MAAM,IAAI,GAAG,MAAM,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMarketBuy.d.ts","sourceRoot":"","sources":["../../examples/testMarketBuy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function populateBook(client) {
|
|
7
|
+
const orders = [
|
|
8
|
+
{ side: Side.SELL, price: 0.75, size: 100 },
|
|
9
|
+
{ side: Side.SELL, price: 0.5, size: 100 },
|
|
10
|
+
];
|
|
11
|
+
for (const newOrder of orders) {
|
|
12
|
+
await client.postLimitOrder(await client.createLimitOrder({
|
|
13
|
+
asset: {
|
|
14
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
15
|
+
condition: "YES",
|
|
16
|
+
},
|
|
17
|
+
side: newOrder.side,
|
|
18
|
+
price: newOrder.price,
|
|
19
|
+
size: newOrder.size,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function market(client) {
|
|
24
|
+
await client.postMarketOrder(await client.createMarketOrder({
|
|
25
|
+
asset: {
|
|
26
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
27
|
+
condition: "YES",
|
|
28
|
+
},
|
|
29
|
+
side: Side.BUY,
|
|
30
|
+
size: 150,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async function main() {
|
|
34
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
35
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
36
|
+
const wallet = pk.connect(provider);
|
|
37
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
38
|
+
const host = "http://localhost:8080";
|
|
39
|
+
const creds = {
|
|
40
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
41
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
42
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
43
|
+
};
|
|
44
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
45
|
+
await populateBook(clobClient);
|
|
46
|
+
await market(clobClient);
|
|
47
|
+
console.log(`Done!`);
|
|
48
|
+
}
|
|
49
|
+
main();
|
|
50
|
+
//# sourceMappingURL=testMarketBuy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMarketBuy.js","sourceRoot":"","sources":["../../examples/testMarketBuy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEvD,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,YAAY,CAAC,MAAkB;IAC1C,MAAM,MAAM,GAAG;QACX,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,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AAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACvD,MAAM,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMarketSell.d.ts","sourceRoot":"","sources":["../../examples/testMarketSell.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function populateBook(client) {
|
|
7
|
+
const orders = [
|
|
8
|
+
{ side: Side.BUY, price: 0.4, size: 100 },
|
|
9
|
+
{ side: Side.BUY, price: 0.5, size: 100 },
|
|
10
|
+
];
|
|
11
|
+
for (const newOrder of orders) {
|
|
12
|
+
await client.postLimitOrder(await client.createLimitOrder({
|
|
13
|
+
asset: {
|
|
14
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
15
|
+
condition: "YES",
|
|
16
|
+
},
|
|
17
|
+
side: newOrder.side,
|
|
18
|
+
price: newOrder.price,
|
|
19
|
+
size: newOrder.size,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function market(client) {
|
|
24
|
+
await client.postMarketOrder(await client.createMarketOrder({
|
|
25
|
+
asset: {
|
|
26
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
27
|
+
condition: "YES",
|
|
28
|
+
},
|
|
29
|
+
side: Side.SELL,
|
|
30
|
+
size: 150,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async function main() {
|
|
34
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
35
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
36
|
+
const wallet = pk.connect(provider);
|
|
37
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
38
|
+
const host = "http://localhost:8080";
|
|
39
|
+
const creds = {
|
|
40
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
41
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
42
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
43
|
+
};
|
|
44
|
+
const clobClient = new ClobClient(host, wallet, creds);
|
|
45
|
+
await populateBook(clobClient);
|
|
46
|
+
await market(clobClient);
|
|
47
|
+
console.log(`Done!`);
|
|
48
|
+
}
|
|
49
|
+
main();
|
|
50
|
+
//# sourceMappingURL=testMarketSell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMarketSell.js","sourceRoot":"","sources":["../../examples/testMarketSell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,UAAU,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAEvD,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;AAEtD,KAAK,UAAU,YAAY,CAAC,MAAkB;IAC1C,MAAM,MAAM,GAAG;QACX,EAAE,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C;IACrC,MAAM,KAAK,GAAgB;QACvB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IACF,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACvD,MAAM,YAAY,CAAC,UAAU,CAAC,CAAC;IAC/B,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAEzB,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMultiSigMarketBuy.d.ts","sourceRoot":"","sources":["../../examples/testMultiSigMarketBuy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side, SignatureType } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function populateBook(client) {
|
|
7
|
+
const orders = [
|
|
8
|
+
{ side: Side.SELL, price: 0.75, size: 100 },
|
|
9
|
+
{ side: Side.SELL, price: 0.5, size: 100 },
|
|
10
|
+
];
|
|
11
|
+
for (const newOrder of orders) {
|
|
12
|
+
await client.postLimitOrder(await client.createLimitOrder({
|
|
13
|
+
asset: {
|
|
14
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
15
|
+
condition: "YES",
|
|
16
|
+
},
|
|
17
|
+
side: newOrder.side,
|
|
18
|
+
price: newOrder.price,
|
|
19
|
+
size: newOrder.size,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function market(client) {
|
|
24
|
+
await client.postMarketOrder(await client.createMarketOrder({
|
|
25
|
+
asset: {
|
|
26
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
27
|
+
condition: "YES",
|
|
28
|
+
},
|
|
29
|
+
side: Side.BUY,
|
|
30
|
+
size: 150,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async function main() {
|
|
34
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
35
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
36
|
+
const wallet = pk.connect(provider);
|
|
37
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
38
|
+
const host = "http://localhost:8080";
|
|
39
|
+
const creds = {
|
|
40
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
41
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
42
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
43
|
+
};
|
|
44
|
+
// Create a clob client, using the CONTRACT signature scheme
|
|
45
|
+
// and providing a multisig as funder address
|
|
46
|
+
const clobPolyClient = new ClobClient(host, wallet, creds, SignatureType.CONTRACT, "0x5cc0c75CdB2235b453e22c9882fAa6945cD6Ec71");
|
|
47
|
+
await populateBook(clobPolyClient);
|
|
48
|
+
await market(clobPolyClient);
|
|
49
|
+
console.log(`Done!`);
|
|
50
|
+
}
|
|
51
|
+
main();
|
|
52
|
+
//# sourceMappingURL=testMultiSigMarketBuy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testMultiSigMarketBuy.js","sourceRoot":"","sources":["../../examples/testMultiSigMarketBuy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC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,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,YAAY,MAAM,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,GAAG,uBAAuB,CAAC;IACrC,MAAM,KAAK,GAAgB;QACvB,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;QAClC,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE;QACpC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE;KAChD,CAAC;IAEF,4DAA4D;IAC5D,6CAA6C;IAC7C,MAAM,cAAc,GAAG,IAAI,UAAU,CACjC,IAAI,EACJ,MAAM,EACN,KAAK,EACL,aAAa,CAAC,QAAQ,EACtB,4CAA4C,CAC/C,CAAC;IAEF,MAAM,YAAY,CAAC,cAAc,CAAC,CAAC;IACnC,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IAE7B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testPolyProxyMarketBuy.d.ts","sourceRoot":"","sources":["../../examples/testPolyProxyMarketBuy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ethers } from "ethers";
|
|
2
|
+
import { config as dotenvConfig } from "dotenv";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { ClobClient, Side, SignatureType } from "../src";
|
|
5
|
+
dotenvConfig({ path: resolve(__dirname, "../.env") });
|
|
6
|
+
async function populateBook(client) {
|
|
7
|
+
const orders = [
|
|
8
|
+
{ side: Side.BUY, price: 0.4, size: 100 },
|
|
9
|
+
{ side: Side.BUY, price: 0.5, size: 100 },
|
|
10
|
+
];
|
|
11
|
+
for (const newOrder of orders) {
|
|
12
|
+
await client.postLimitOrder(await client.createLimitOrder({
|
|
13
|
+
asset: {
|
|
14
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
15
|
+
condition: "YES",
|
|
16
|
+
},
|
|
17
|
+
side: newOrder.side,
|
|
18
|
+
price: newOrder.price,
|
|
19
|
+
size: newOrder.size,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
async function market(client) {
|
|
24
|
+
await client.postMarketOrder(await client.createMarketOrder({
|
|
25
|
+
asset: {
|
|
26
|
+
address: "0xadbeD21409324e0fcB80AE8b5e662B0C857D85ed",
|
|
27
|
+
condition: "YES",
|
|
28
|
+
},
|
|
29
|
+
side: Side.SELL,
|
|
30
|
+
size: 150,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
async function main() {
|
|
34
|
+
const provider = new ethers.providers.JsonRpcProvider(process.env.ETH_RPC_URL);
|
|
35
|
+
const pk = new ethers.Wallet(`${process.env.PK}`);
|
|
36
|
+
const wallet = pk.connect(provider);
|
|
37
|
+
console.log(`Address: ${await wallet.getAddress()}`);
|
|
38
|
+
const host = "http://localhost:8080";
|
|
39
|
+
const creds = {
|
|
40
|
+
key: `${process.env.CLOB_API_KEY}`,
|
|
41
|
+
secret: `${process.env.CLOB_SECRET}`,
|
|
42
|
+
passphrase: `${process.env.CLOB_PASS_PHRASE}`,
|
|
43
|
+
};
|
|
44
|
+
// Create a clob client, using the poly proxy signature scheme
|
|
45
|
+
// and providing the proxy address
|
|
46
|
+
const clobPolyClient = new ClobClient(host, wallet, creds, SignatureType.POLY_PROXY, "0xb57af06b944df7df17b9661652f72b954286ee07");
|
|
47
|
+
await populateBook(clobPolyClient);
|
|
48
|
+
await market(clobPolyClient);
|
|
49
|
+
console.log(`Done!`);
|
|
50
|
+
}
|
|
51
|
+
main();
|
|
52
|
+
//# sourceMappingURL=testPolyProxyMarketBuy.js.map
|