Skip to content

quantpylib.datapoller.crypto

Crypto

Bases: BasePoller

get_funding_rates(**kwargs) async

Retrieve funding rate data for cryptocurrencies. @ts_poller

Parameters:

Name Type Description Default
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Type Description

Trade bar data for the specified cryptocurrency from the selected data source.

Examples:

>>> df=datapoller.crypto.get_funding_rates(ticker="ETH",start=start,end=end,src="hyperliquid")

get_ticker_fundamentals(ticker, **kwargs)

Retrieve fundamentals data for a specific cryptocurrency. @poller

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Type Description

Fundamentals data for the specified cryptocurrency from the selected data source.

Examples:

>>> f=datapoller.crypto.get_ticker_fundamentals(ticker="ETH-USD",src="eodhd")

get_ticker_metadata(ticker, **kwargs)

Retrieve metadata for a specific cryptocurrency. @poller

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Type Description

Metadata for the specified cryptocurrency from the selected data source.

get_trade_bars(**kwargs) async

Retrieve OHLCV trade bar data for cryptocurrencies. @ts_poller

Parameters:

Name Type Description Default
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Type Description

Trade bar data for the specified cryptocurrency from the selected data source.

Examples:

>>> df=datapoller.crypto.get_trade_bars(ticker="BTCUSDT",start=start,end=end,granularity="d",src="binance")

l1_book_subscribe(ticker, handler, **kwargs) async

Stream L1 OB data for a specific cryptocurrency. @poller(tag="stream")

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
handler coroutine

A coroutine handler for the message received.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Examples:

>>> async def handler(msg): 
        print(msg)
>>> await datapoller.crypto.l1_book_subscribe(ticker="BTC-USD",src="eodhd",handler=handler)

l1_book_unsubscribe(ticker, **kwargs) async

Terminate streaming for market data of a specific cryptocurrency. @poller(tag="stream")

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

l2_book_subscribe(ticker, handler, **kwargs) async

Stream L2 OB data for a specific cryptocurrency. @poller(tag="stream")

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
handler coroutine

A coroutine handler for the message received.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}

Returns:

Examples:

>>> async def handler(msg): 
        print(msg)
>>> await datapoller.crypto.l2_book_subscribe(ticker="BTC-USD",src="eodhd",handler=handler)

l2_book_unsubscribe(ticker, **kwargs) async

Terminate streaming for market data of a specific cryptocurrency. @poller(tag="stream")

Parameters:

Name Type Description Default
ticker str

Cryptocurrency ticker symbol.

required
**kwargs

Data-source specific keyword arguments for endpoint specification.

{}