Skip to main content

Account Endpoints

Query account information, order status, and trade history. All endpoints require HMAC-SHA256 signature (SecurityType: UserData).

Binance API Reference: Spot Account/Trade

Account Information

Get current account information including balances and permissions.

val account: F[AccountInfo] = client.accountInfo
EndpointGET /api/v3/account
AuthHMAC Signed
Weight20

Key response fields:

case class AccountInfo(
canTrade: Boolean,
canWithdraw: Boolean,
canDeposit: Boolean,
accountType: String,
balances: List[Balance], // Balance(asset, free, locked)
// ...
)

Query Order

Check the status of an order.

val order: F[OrderInfo] = client.orderStatus("BTCUSDT", orderId = Some(12345L))
EndpointGET /api/v3/order
AuthHMAC Signed
Weight4

Open Orders

Get all open orders on a symbol or all symbols.

// Single symbol
val open: F[List[OrderInfo]] = client.openOrders(Some("BTCUSDT"))

// All symbols
val allOpen: F[List[OrderInfo]] = client.openOrders()
EndpointGET /api/v3/openOrders
AuthHMAC Signed
Weight6 (single) / 80 (all)

All Orders

Get all orders (active, canceled, filled) for a symbol.

val orders: F[List[OrderInfo]] = client.allOrders("BTCUSDT", limit = Some(100))
EndpointGET /api/v3/allOrders
AuthHMAC Signed
Weight20

My Trades

Get the account's trade history for a symbol.

val trades: F[List[MyTrade]] = client.myTrades("BTCUSDT", limit = Some(50))
EndpointGET /api/v3/myTrades
AuthHMAC Signed
Weight20

Order Rate Limit

Get the current unfilled order count for each rate limit interval.

val limits: F[List[RateLimitOrder]] = client.rateLimitOrder
EndpointGET /api/v3/rateLimit/order
AuthHMAC Signed
Weight40

Order List Status

Check the status of an OCO or order list.

import io.github.rafafrdz.binance4s.api.account.OrderListStatusReq

val orderList: F[OrderListResponse] = client.execute(OrderListStatusReq(orderListId = Some(123L)))
EndpointGET /api/v3/orderList
AuthHMAC Signed
Weight4

All Order Lists

Get all order lists (OCO) for the account.

import io.github.rafafrdz.binance4s.api.account.AllOrderListReq

val lists: F[List[OrderListResponse]] = client.execute(AllOrderListReq(limit = Some(10)))
EndpointGET /api/v3/allOrderList
AuthHMAC Signed
Weight20

Open Order Lists

Get all open order lists (OCO).

import io.github.rafafrdz.binance4s.api.account.OpenOrderListReq

val open: F[List[OrderListResponse]] = client.execute(OpenOrderListReq())
EndpointGET /api/v3/openOrderList
AuthHMAC Signed
Weight6

Prevented Matches

Get the list of orders that were prevented from trading due to self-trade prevention.

import io.github.rafafrdz.binance4s.api.account.PreventedMatchesReq

val matches: F[List[PreventedMatch]] = client.execute(PreventedMatchesReq("BTCUSDT"))
EndpointGET /api/v3/myPreventedMatches
AuthHMAC Signed
Weight20

SOR Allocations

Get the SOR (Smart Order Router) allocation history.

import io.github.rafafrdz.binance4s.api.account.AllocationsReq

val allocs: F[List[SorAllocation]] = client.execute(AllocationsReq("BTCUSDT"))
EndpointGET /api/v3/myAllocations
AuthHMAC Signed
Weight20

Commission Rates

Get the commission rates for a specific symbol.

val comm: F[Commission] = client.commission("BTCUSDT")
EndpointGET /api/v3/account/commission
AuthHMAC Signed
Weight20