How do I get this data via API?

Custom indicators, trading strategies, data export and recording and more...
pzgwl
Posts: 3
Joined: Sun Sep 01, 2024 4:20 pm

How do I get this data via API?

Post by pzgwl » Sun Sep 08, 2024 9:53 pm

How do I get this data

[... {'price': 55680, 'volume': 535.88}, {'price': 55040, 'volume': 1200}, ...]

as pictured, for a given range of interest, via rest API or websocket for Binance Futures and Bybit BTCUSDT?

Thanks
 

Image

Andry API support
Posts: 607
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 27 times
Been thanked: 86 times

Re: How do I get this data via API?

Post by Andry API support » Mon Sep 09, 2024 6:20 am

It would be much easier if you used Bookmap L1 API for your purpose. To recommend you a certain API we would be grateful if you answered these questions:
 * Java or Python, which one do you prefer?
 * how experienced are you in programming (beginner/intermediate/professonal)?

You also may want to learn more about Bookmap L1 API here
https://bookmap.com/knowledgebase/docs/ ... ons-api-l1

pzgwl
Posts: 3
Joined: Sun Sep 01, 2024 4:20 pm

Re: How do I get this data via API?

Post by pzgwl » Mon Sep 09, 2024 6:44 am

Hi Andry, thanks for reaching out. Python intermediate. I see there is a Python API (https://github.com/BookmapAPI/python-api), but does it only run as an add-on with the bookmap app running?

I trade from a linux VM on AWS, so it's just terminal. Ideally I would just pass API keys in the request and nothing else.

Looking forward to your recommendation

Andry API support
Posts: 607
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 27 times
Been thanked: 86 times

Re: How do I get this data via API?

Post by Andry API support » Mon Sep 09, 2024 7:04 am

I see there is a Python API (https://github.com/BookmapAPI/python-api), but does it only run as an add-on with the bookmap app running?
Yes.
These figures [... {'price': 55680, 'volume': 535.88}, {'price': 55040, 'volume': 1200}, ...] are a representation of an orderbook.
Please see this chapter for more info
https://developers.binance.com/docs/der ... Order-Book

pzgwl
Posts: 3
Joined: Sun Sep 01, 2024 4:20 pm

Re: How do I get this data via API?

Post by pzgwl » Mon Sep 09, 2024 11:11 am

I already tried the Binance API first, but it does not show order book prices beyond a very tight range; (example below) 54.2 - 54.7k, and that's it. 

I was hoping for a solution via just API keys (and no software) as there is web.bookmap.com which requires no software; it's just a request from a browser.

I'm sure this can be automated to get the data I am looking for, but it's really a lot of unnecessary extra work from my end. I don't know how Bookmap doesn't provide access to extended-range order book in a simpler way.  


Image

 

Post Reply