Skip to content

Commit

Permalink
Merge pull request #33 from Polymarket/feat/mainnet
Browse files Browse the repository at this point in the history
feat: update to latest order-utils
  • Loading branch information
JonathanAmenechi authored May 31, 2022
2 parents 5b9d0b5 + 27d432b commit ca91ce7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@polymarket/clob-client",
"description": "Typescript client for Polymarket's CLOB",
"version": "1.0.26",
"version": "1.0.27",
"contributors": [
{
"name": "Jonathan Amenechi",
Expand All @@ -23,7 +23,7 @@
"@ethersproject/random": "^5.5.0",
"@ethersproject/transactions": "^5.5.0",
"@ethersproject/wallet": "^5.5.0",
"@polymarket/order-utils": "1.2.12",
"@polymarket/order-utils": "^1.2.13",
"axios": "^0.21.1",
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.3.0",
Expand Down
9 changes: 3 additions & 6 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ export class ClobClient {
}

public async getOrderBook(tokenID: string): Promise<any> {
const endpoint = `${this.host}${GET_ORDER_BOOK}?market=${tokenID}`;
return get(endpoint);
return get(`${this.host}${GET_ORDER_BOOK}?market=${tokenID}`);
}

public async getMidpoint(tokenID: string): Promise<any> {
Expand All @@ -92,12 +91,10 @@ export class ClobClient {
return get(`${this.host}${PRICE}?market=${tokenID}&side=${side}`);
}

public async getLastTradePrice(tokenID: string, side:string): Promise<any> {
const endpoint = `${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}&side=${side}`;
return get(endpoint);
public async getLastTradePrice(tokenID: string, side: string): Promise<any> {
return get(`${this.host}${GET_LAST_TRADE_PRICE}?market=${tokenID}&side=${side}`);
}


// L1 Authed

/**
Expand Down

0 comments on commit ca91ce7

Please sign in to comment.