TradeEndpoints extension

Account / Trade endpoints for Binance Spot API

on

Methods

accountInformation({int? recvWindow}) Future<Either<String, AccountInfo>>
Get current account information.
accountTradeList({required String symbol, int? orderId, int? startTime, int? endTime, int? fromId, int? limit, int? recvWindow}) Future<Either<String, List<AccountTrade>>>
Get trades for a specific account and symbol.
allOrders({required String symbol, int? orderId, int? startTime, int? endTime, int? limit, int? recvWindow}) Future<Either<String, List<CurrentOrder>>>
Get all account orders; active, canceled, or filled.
cancelallOpenOrders({required String symbol, int? recvWindow}) Future<Either<String, List<CanceledOrder>>>
Cancels all active orders on a symbol. This includes OCO orders.
cancelOCO({required String symbol, int? orderListId, String? listClientOrderId, String? newClientOrderId, int? recvWindow}) Future<Either<String, OcoOrder>>
Cancel an entire Order List.
cancelOrder({required String symbol, int? orderId, String? origClientOrderId, String? newClientOrderId, int? recvWindow}) Future<Either<String, CanceledOrder>>
Cancel an active order. Either orderId or origClientOrderId must be sent.
currentOpenOrders({String? symbol, int? recvWindow}) Future<Either<String, List<CurrentOrder>>>
Get all open orders on a symbol. Careful when accessing this with no symbol.
newOCO({required String symbol, String? listClientOrderId, required Side side, required String quantity, int? limitClientOrderId, required String price, String? limitIcebergQty, String? stopClientOrderId, required String stopPrice, String? stopLimitPrice, String? stopIcebergQty, TimeInForce? stopLimitTimeInForce, String? newOrderRespType, int? recvWindow}) Future<Either<String, OcoOrder>>
Send in a new OCO
newOrder({required String symbol, required Side side, required OrderType type, TimeInForce? timeInForce, String? quantity, String? quoteOrderQty, String? price, String? newClientOrderId, String? stopPrice, String? icebergQty, String? newOrderRespType, int? recvWindow}) Future<Either<String, Order>>
Send in a new order / Response type is RESULT
queryallOCO({int? fromId, int? startTime, int? endTime, int? limit, int? recvWindow}) Future<Either<String, List<OcoOrder>>>
Retrieves all OCO based on provided optional parameters
queryOCO({int? orderListId, String? origClientOrderId, int? recvWindow}) Future<Either<String, OcoOrder>>
Retrieves a specific OCO based on provided optional parameters
queryOpenOCO({int? recvWindow}) Future<Either<String, List<OcoOrder>>>
Query all currently open OCO orders.
queryOrder({required String symbol, int? orderId, String? origClientOrderId, int? recvWindow}) Future<Either<String, CurrentOrder>>
Check an order's status.