diff --git a/examples/getLastTradePrice.ts b/examples/getLastTradePrice.ts index eece921..b7346ea 100644 --- a/examples/getLastTradePrice.ts +++ b/examples/getLastTradePrice.ts @@ -15,7 +15,7 @@ async function main() { const clobClient = new ClobClient(host, wallet); console.log(`Price: `); - const resp = await clobClient.getLastTradePrice("16678291189211314787145083999015737376658799626183230671758641503291735614088"); + const resp = await clobClient.getLastTradePrice("16678291189211314787145083999015737376658799626183230671758641503291735614088", "buy"); console.log(resp); } diff --git a/package.json b/package.json index 8d22b91..9ae068a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@polymarket/clob-client", "description": "Typescript client for Polymarket's CLOB", - "version": "1.0.25", + "version": "1.0.26", "contributors": [ { "name": "Jonathan Amenechi", diff --git a/src/client.ts b/src/client.ts index 5ed68fd..30e19a4 100644 --- a/src/client.ts +++ b/src/client.ts @@ -92,8 +92,8 @@ export class ClobClient { return get(`${this.host}${PRICE}?market=${tokenID}&side=${side}`); } - public async getLastTradePrice(tokenID: string): Promise { - const endpoint = `${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}`; + public async getLastTradePrice(tokenID: string, side:string): Promise { + const endpoint = `${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}&side=${side}`; return get(endpoint); }