FutureApi

final case class FutureApi[F[_]](config: FapiConfig, client: HttpClient[F], exchangeInfo: ExchangeInformation, rateLimiters: RateLimiters[F])(implicit F: Async[F]) extends BinanceApi[F]
Companion:
object
trait Serializable
trait Product
trait Equals
trait BinanceApi[F]
class Object
trait Matchable
class Any

Type members

Types

Value members

Concrete methods

def aggregateTradeStreams(symbol: String): Stream[F, AggregateTradeStream]

The Aggregate Trade Streams push trade information that is aggregated for a single taker order every 100 milliseconds.

The Aggregate Trade Streams push trade information that is aggregated for a single taker order every 100 milliseconds.

Value parameters:
symbol

the symbol

Returns:

a stream of aggregate trade events

def cancelAllOrders(orderCancel: FutureOrderCancelAllParams): F[Unit]

Cancels all orders of a symbol.

Cancels all orders of a symbol.

Value parameters:
orderCancel

the parameters required to cancel all the orders

Returns:

currently nothing

def cancelOrder(orderCancel: FutureOrderCancelParams): F[Unit]

Cancels an order.

Cancels an order.

Value parameters:
orderCancel

the parameters required to cancel the order

Returns:

currently nothing

Change user's initial leverage of specific symbol market.

Change user's initial leverage of specific symbol market.

Value parameters:
changeLeverage

request parameters

Returns:

the new leverage

def changePositionMode(dualSidePosition: Boolean): F[Unit]

Change user's position mode (Hedge Mode or One-way Mode) on EVERY symbol

Change user's position mode (Hedge Mode or One-way Mode) on EVERY symbol

Value parameters:
dualSidePosition

"true": Hedge Mode; "false": One-way Mode

Returns:

Unit

def contractKLineStreams(symbol: String, contractType: FutureContractType, interval: Interval): Stream[F, ContractKLineStream]

Continuous Contract Kline/Candlestick Streams of updates every 250 milliseconds.

Continuous Contract Kline/Candlestick Streams of updates every 250 milliseconds.

Value parameters:
contractType

the contract type

interval

the interval

symbol

the symbol

Returns:

a stream of contract klines

Creates an order.

Creates an order.

Value parameters:
orderCreate

the parameters required to define the order

Returns:

The id of the order created

Returns the current balance, at the time the query is executed.

Returns the current balance, at the time the query is executed.

Returns:

The balance (free and locked) for each asset

def getKLines(query: KLines): Stream[F, KLine]

Returns a stream of Kline objects. It recursively and lazily invokes the endpoint in case the result set doesn't fit in a single page.

Returns a stream of Kline objects. It recursively and lazily invokes the endpoint in case the result set doesn't fit in a single page.

Value parameters:
query

an KLines object containing the query parameters

Returns:

the stream of Kline objects

Gets order data.

Gets order data.

Value parameters:
getOrder

the parameters required to find existing order

Returns:

The id of the order created

def getPrice(symbol: String): F[Price]

Returns the latest price for a symbol.

Returns the latest price for a symbol.

Value parameters:
symbol

The symbol

Returns:

The price for the symbol

def getPrices(): F[Seq[Price]]

Returns a snapshot of the prices at the time the query is executed.

Returns a snapshot of the prices at the time the query is executed.

Returns:

A sequence of prices (one for each symbol)

def kLineStreams(symbol: String, interval: Interval): Stream[F, KLineStream]

The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing).

The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing).

Value parameters:
interval

the interval

symbol

the symbol

Returns:

a stream of klines

def markPriceStream(symbol: String): Stream[F, MarkPriceUpdate]

Mark price and funding rate for a single symbol pushed every 3 seconds

Mark price and funding rate for a single symbol pushed every 3 seconds

Value parameters:
symbol

the symbol

Returns:

a stream of mark price updates

Mark price and funding rate for all symbols pushed every 3 seconds

Mark price and funding rate for all symbols pushed every 3 seconds

Returns:

a stream of mark price updates

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product