quantpylib.wrappers.binance
Binance
__init__()
Initialize the Binance instance with the Binance exchange client and rate limiter.
Read
https://binance-docs.github.io/apidocs/spot/en/#limits
get_exchange_server_timestamp(**kwargs)
Retrieve the server timestamp from the Binance exchange.
Returns:
Name | Type | Description |
---|---|---|
int |
The server timestamp from the Binance exchange. |
get_ticker_metadata(ticker, **kwargs)
Retrieve metadata for the specified ticker.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker |
str
|
The trading instrument ticker. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
Metadata for the specified ticker. |
get_tickers_in_exchange(**kwargs)
Retrieve the collection of tickers available in the Binance exchange.
Returns:
Name | Type | Description |
---|---|---|
dict |
A dictionary of tickers available in the Binance exchange. |
get_trade_bars(ticker, start, end, granularity, granularity_multiplier, **kwargs)
Retrieve OHLCV trade bar data for the specified ticker and time range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ticker |
str
|
The trading instrument ticker. |
required |
start |
datetime
|
The start date and time for data retrieval. |
required |
end |
datetime
|
The end date and time for data retrieval. |
required |
granularity |
Period
|
The period type for the OHLCV bars. |
required |
granularity_multiplier |
int
|
The granularity multiplier. |
required |
Returns:
Type | Description |
---|---|
pd.DataFrame: The OHLCV trade bar data for the specified ticker and time range. |