Ticker

Current market price of latest trade on exchange.

ticker(symbol: Optional[str], exchange: Optional[int|str]) -> decimal

Returns last price for symbol on exchange .

Parameters:

symbol : str, default 'base-counter'

Use token symbols in the 'symbol-symbol' format. Example: 'ETH-USDT','base-USDT',’ETH-counter. If symbol is empty - uses current symbol for bot. Shortcuts base and counter could be used.

exchange : int|str, default bot's exchange

If exchange is empty - uses current exchange for bot’s account. Exchanges names and indexes could be found in Exchange list.

Returns: Decimal

Example

Will return last price for current bot's symbol and exchange.

ticker()

123

ticker('base-counter','bybit')

123

ticker('base-counter',23)

123

ticker('base-ETH','binance')

123

ticker('ETH-USDT','gateio')

123

ticker('base-ETH','bybit')*ticker('ETH-USDT','bybit')

Last updated