javascript-sdk icon indicating copy to clipboard operation
javascript-sdk copied to clipboard

Order history method is missing in Javascript-SDK

Open CatScan-crypt opened this issue 5 years ago • 2 comments

Hey there, I want to get order history with javascript-sdk but can't find any option for it . I can see that python-sdk for example have an option called: "client.get_closed_orders" , But i couldn't find any equivalent in javascript-sdk 😒 help pls 🙏

CatScan-crypt avatar Sep 14 '20 00:09 CatScan-crypt

Ok found the problem. "binance-chain/javascript-sdk/blob/master/src/client/index.ts" file is missing the closed order api.

Solved it by duplicating every "getOpenOrders" { whole section } var in that file and changing the values from Open to Closed.

Will add a pull req later 😎

CatScan-crypt avatar Sep 14 '20 01:09 CatScan-crypt

Sooo it did fix the problem but now i can't query open orders, It looks like an issue with the index.ts file, But i'm not savvy enough to find the problem. For now i just use the API to fetch closed orders , not ideal but it works.

https://testnet-dex.binance.org/api/v1/orders/closed?address=

CatScan-crypt avatar Sep 15 '20 12:09 CatScan-crypt