Binance

Guide

Account Info

The Account Info method allows you to retrieve detailed information about your Binance account. This includes permissions, commission settings, and wallet balances. This method is part of the Binance service provider integration used in our platform.

Input Parameters

Name Description
API Key Your Binance API Key
Secret Key Your Binance Secret Key
Binance Testnet Flag indicating whether to use the Binance Testnet: https://testnet.binance.vision

Result Payload

The result contains core account details, permission flags, and commission rate information.

Field Type Description
uid Integer Account ID
accountType Text Account type, e.g., "SPOT"
makerCommission Integer Maker commission rate
takerCommission Integer Taker commission rate
buyerCommission Integer Buyer commission rate
sellerCommission Integer Seller commission rate
canTrade Boolean Indicates if trading is allowed
canWithdraw Boolean Indicates if withdrawals are allowed
canDeposit Boolean Indicates if deposits are allowed
brokered Boolean Indicates if the account is brokered
requireSelfTradePrevention Boolean Indicates if self-trade prevention is required
preventSor Boolean Indicates if smart order routing is disabled
commissionRates Rates payload Detailed commission rates (see table below)
balances List of balance payloads Asset balances in your account (see table below)

Rates Payload

Field Type Description
maker Real number Maker commission rate
taker Real number Taker commission rate
buyer Real number Buyer commission rate
seller Real number Seller commission rate

For more details, refer to the Binance FAQ.

Balance Payload

Field Type Description
asset Text Name of the asset (e.g., BTC, ETH)
free Real number Available balance for trading
locked Real number Balance currently locked in orders

Sample Payload

{
  "uid": 1234567890,
  "makerCommission": 0,
  "buyerCommission": 0,
  "canWithdraw": true,
  "accountType": "SPOT",
  "sellerCommission": 0,
  "canTrade": true,
  "brokered": false,
  "preventSor": false,
  "balances": [
    {
      "asset": "ETH",
      "free": 1.0,
      "locked": 0.0
    },
    {
      "asset": "BTC",
      "free": 1.0,
      "locked": 0.0
    }
  ],
  "commissionRates": {
    "seller": 0.0,
    "maker": 0.0,
    "taker": 0.0,
    "buyer": 0.0
  },
  "canDeposit": true,
  "takerCommission": 0,
  "requireSelfTradePrevention": false
}                   

Result Mapping

The result of this method is mapped into the execution state using a JSON Path expression. You can specify where the resulting data should be stored for further use in your workflow.

* * *

Market Buy Order / Market Sell Order

These methods allow you to create market buy or sell orders through the Binance service provider. Market orders are executed immediately at the best available price.

Input Parameters

Name Description
API Key Your Binance API Key
Secret Key Your Binance Secret Key
Binance Testnet Flag indicating whether to use the Binance Testnet: https://testnet.binance.vision
Symbol The trading pair (e.g., "BTCUSDT", "ETHUSDT")
Quantity The amount of the asset to buy or sell

Result Payload

The result returns details about the executed market order, including its status, execution time, and any fills.

Field Type Description
symbol Integer The trading pair
orderId Integer Unique order ID
orderListId Integer Always -1 for market orders
clientOrderId Text Client-generated unique ID for open orders
transactTime Integer Transaction timestamp
price Real number Order price
origQty Real number Original quantity
executedQty Real number Executed quantity
origQuoteOrderQty Real number Original quote quantity
cummulativeQuoteQty Real number Total quote quantity filled
status Text Order status: "NEW", "PENDING_NEW", "PARTIALLY_FILLED", "FILLED", "CANCELED", "PENDING_CANCEL", "REJECTED", "EXPIRED", or "EXPIRED_IN_MATCH"
timeInForce Text Order time in force: "GTC", "IOC", or "FOK"
type Text Order type, always "MARKET"
side Text Order side: "BUY" or "SELL"
workingTime Integer Working time of the order
selfTradePreventionMode Text Self-trade prevention setting
fills List of trade payloads List of fills associated with the order (see below)

Trade Payload

Field Type Description
price Real number Trade price
qty Real number Trade quantity
commission Real number Commission charged
commissionAsset Text Asset used for commission
tradeId Integer Trade ID

Sample Payload

{
  "symbol": "BTCUSDT",
  "cummulativeQuoteQty": 1092.1133532,
  "side": "SELL",
  "orderListId": -1,
  "executedQty": 0.01,
  "orderId": 7384581,
  "origQty": 0.01,
  "clientOrderId": "2h8KvkV1msU3oFfzB4tZsc",
  "workingTime": 1748220412548,
  "type": "MARKET",
  "price": 97000.0,
  "transactTime": 1748220412548,
  "selfTradePreventionMode": "EXPIRE_MAKER",
  "origQuoteOrderQty": 0.0,
  "timeInForce": "GTC",
  "fills": [
    {
      "price": 109211.34,
      "qty": 0.00974,
      "commission": 0.0,
      "commissionAsset": "USDT",
      "tradeId": 3245899
    },
    {
      "price": 109211.16,
      "qty": 0.00026,
      "commission": 0.0,
      "commissionAsset": "USDT",
      "tradeId": 3245900
    }
  ],
  "status": "FILLED"
}
                    

Result Mapping

A JSON Path expression is used to specify where the resulting order data should be stored in the execution state. This allows you to access and use the result later in your workflow.

* * *

Limit Buy Order / Limit Sell Order

These methods allow you to create limit buy or sell orders through the Binance service provider. A limit order specifies the maximum (for buys) or minimum (for sells) price at which you are willing to trade.

Input Parameters

Name Description
API Key Your Binance API Key
Secret Key Your Binance Secret Key
Binance Testnet Flag indicating whether to use the Binance Testnet: https://testnet.binance.vision
Symbol The trading pair (e.g., "BTCUSDT", "ETHUSDT")
Quantity The amount of the asset to buy or sell
Price The limit price of the order
Time In Force Order time in force: "GTC", "IOC", or "FOK"

Time In Force Options

Code Meaning Description
GTC Good 'Til Canceled The order remains active on the book until it is fully filled or canceled.
IOC Immediate Or Cancel The order will attempt to fill as much as possible immediately before expiring.
FOK Fill Or Kill The order will only execute if it can be fully filled immediately. Otherwise, it is canceled.

Result Payload

The result returns details about the placed limit order, including status, quantities, price, and any fills.

Field Type Description
symbol Integer The trading pair
orderId Integer Unique order ID
orderListId Integer Always -1 for individual limit orders
clientOrderId Text Client-generated unique ID for the order
transactTime Integer Transaction timestamp
price Real number Limit price
origQty Real number Original quantity requested
executedQty Real number Quantity that has been executed
origQuoteOrderQty Real number Original quote quantity
cummulativeQuoteQty Real number Total filled quote quantity
status Text Order status: "NEW", "PENDING_NEW", "PARTIALLY_FILLED", "FILLED", "CANCELED", "PENDING_CANCEL", "REJECTED", "EXPIRED", or "EXPIRED_IN_MATCH"
timeInForce Text Time in force setting
type Text Order type, always "LIMIT"
side Text Order side: "BUY" or "SELL"
workingTime Integer Order working time
selfTradePreventionMode Text Self-trade prevention setting
fills List of trade payloads List of trades associated with the order (see below)

Trade Payload

Field Type Description
price Real number Trade price
qty Real number Trade quantity
commission Real number Commission charged
commissionAsset Text Asset used for commission
tradeId Integer Trade ID

Sample Payload

{
  "symbol": "BTCUSDT",
  "cummulativeQuoteQty": 1092.1133532,
  "side": "SELL",
  "orderListId": -1,
  "executedQty": 0.01,
  "orderId": 7384581,
  "origQty": 0.01,
  "clientOrderId": "2h8KvkV1msU3oFfzB4tZsc",
  "workingTime": 1748220412548,
  "type": "LIMIT",
  "price": 97000.0,
  "transactTime": 1748220412548,
  "selfTradePreventionMode": "EXPIRE_MAKER",
  "origQuoteOrderQty": 0.0,
  "timeInForce": "GTC",
  "fills": [
    {
      "price": 109211.34,
      "qty": 0.00974,
      "commission": 0.0,
      "commissionAsset": "USDT",
      "tradeId": 3245899
    },
    {
      "price": 109211.16,
      "qty": 0.00026,
      "commission": 0.0,
      "commissionAsset": "USDT",
      "tradeId": 3245900
    }
  ],
  "status": "FILLED"
}
                    

Result Mapping

A JSON Path expression is used to specify where the resulting order data should be stored in the execution state. This enables integration with subsequent actions or conditions within your workflow.

* * *

Klines

The Klines method provided by the Binance service retrieves the most recent candlestick (kline) data for a specified trading pair. Each kline represents the trading activity within a specific interval, offering a summary of price movements, volume, and trade count.

Input Parameters

Name Description
Symbol A trading pair such as "BTCUSDT" or "ETHUSDT".
Interval A time interval for the klines. Valid values are: "1s", "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "6h", "8h", "12h", "1d", "3d", "1w", "1M".
Limit The number of kline intervals to return.

Result Payload

The method returns an array of kline objects. Each kline contains the following data fields:

Name Description
symbol The trading pair symbol.
numberTrades Total number of trades in the interval.
lowPrice Lowest price during the interval.
closeTime Timestamp representing the close time of the kline.
highPrice Highest price during the interval.
openPrice Opening price at the start of the interval.
baseAssetVolume Volume of the base asset traded.
startTime Timestamp representing the open time of the kline.
interval The interval used (e.g., "1m").
closePrice Closing price at the end of the interval.
quoteAssetVolume Volume of the quote asset traded.

Sample Payload

[
  {
    "symbol": "BTCUSDT",
    "numberTrades": 3506,
    "lowPrice": 109242.38,
    "highPrice": 109289.99,
    "closeTime": 1748220179999,
    "openPrice": 109269.77,
    "baseAssetVolume": 16.76604,
    "startTime": 1748220120000,
    "interval": "1m",
    "closePrice": 109248.3,
    "quoteAssetVolume": 1832067.9211871
  },
  {
    "symbol": "BTCUSDT",
    "numberTrades": 2407,
    "lowPrice": 109181.81,
    "highPrice": 109248.29,
    "closeTime": 1748220239999,
    "openPrice": 109248.29,
    "baseAssetVolume": 8.60817,
    "startTime": 1748220180000,
    "interval": "1m",
    "closePrice": 109181.82,
    "quoteAssetVolume": 940120.9919729
  },
  {
    "symbol": "BTCUSDT",
    "numberTrades": 1728,
    "lowPrice": 109161.7,
    "highPrice": 109212.11,
    "closeTime": 1748220299999,
    "openPrice": 109181.81,
    "baseAssetVolume": 6.13045,
    "startTime": 1748220240000,
    "interval": "1m",
    "closePrice": 109188.0,
    "quoteAssetVolume": 669340.8744426
  },
  {
    "symbol": "BTCUSDT",
    "numberTrades": 4112,
    "lowPrice": 109156.73,
    "highPrice": 109251.75,
    "closeTime": 1748220359999,
    "openPrice": 109188.0,
    "baseAssetVolume": 12.90155,
    "startTime": 1748220300000,
    "interval": "1m",
    "closePrice": 109214.77,
    "quoteAssetVolume": 1409001.305083
  },
  {
    "symbol": "BTCUSDT",
    "numberTrades": 1056,
    "lowPrice": 109192.69,
    "highPrice": 109216.72,
    "closeTime": 1748220419999,
    "openPrice": 109214.76,
    "baseAssetVolume": 2.52804,
    "startTime": 1748220360000,
    "interval": "1m",
    "closePrice": 109216.72,
    "quoteAssetVolume": 276092.6766198
  }
]
                    

Result Mapping

JSON Path expressions can be used to extract and store the result data into the execution state for downstream use.

* * *

Order Book

The Order Book method from the Binance service provider allows you to retrieve real-time order depth data for a given trading pair. It provides information about current buy (bid) and sell (ask) orders, enabling users to better understand market supply and demand at different price levels.

Input Parameters

Name Description
Symbol The trading pair to query, such as "BTCUSDT" or "ETHUSDT".
Limit Defines how many levels of order depth should be retrieved for both ask and bid sides.

Result Payload

The response contains an object with two arrays: asks and bids. Each array holds a list of orders, where each order includes price and quantity values.

Name Description
price The order price.
qty The quantity available at that price level.

Sample Payload

{
  "asks": [
    { "price": 2598.5, "qty": 18.3788 },
    { "price": 2598.51, "qty": 0.0021 },
    { "price": 2598.52, "qty": 0.0021 },
    { "price": 2598.53, "qty": 0.0051 },
    { "price": 2598.54, "qty": 0.081 }
  ],
  "bids": [
    { "price": 2598.49, "qty": 0.1625 },
    { "price": 2598.48, "qty": 0.7727 },
    { "price": 2598.47, "qty": 0.0021 },
    { "price": 2598.46, "qty": 0.0063 },
    { "price": 2598.45, "qty": 0.0041 }
  ]
}
                    

Result Mapping

A JSON Path expression defines where the retrieved order book data should be stored within the execution state. This allows the data to be accessed or reused in subsequent steps of the workflow.

* * *

Trades

The Trades method from the Binance service provider retrieves a list of the most recent trades for a specified trading pair. This information is useful for analyzing the latest market activity, including trade prices, quantities, and buyer/seller information.

Input Parameters

Name Description
Symbol The trading pair to retrieve trades for, such as "BTCUSDT" or "ETHUSDT".
Limit The number of recent trades to return.

Result Payload

The result is an array of trade objects. Each trade includes details such as price, quantity, trade ID, timestamp, and buyer/seller information.

Name Description
id Unique identifier for the trade.
price The price at which the trade occurred.
qty The quantity of the asset traded.
quoteQty The quantity in quote asset terms.
time The timestamp of the trade.
isBestMatch Indicates whether this trade was the best match for the order.
isBuyerMaker Indicates whether the buyer is the maker.

Sample Payload

[
  {
    "quoteQty": 5.404665,
    "price": 2573.65,
    "qty": 0.0021,
    "isBestMatch": true,
    "id": 2468183367,
    "time": 1748329031938,
    "isBuyerMaker": true
  },
  {
    "quoteQty": 5.1473,
    "price": 2573.65,
    "qty": 0.002,
    "isBestMatch": true,
    "id": 2468183368,
    "time": 1748329031938,
    "isBuyerMaker": true
  },
  {
    "quoteQty": 3065.462604,
    "price": 2573.64,
    "qty": 1.1911,
    "isBestMatch": true,
    "id": 2468183369,
    "time": 1748329031938,
    "isBuyerMaker": true
  },
  {
    "quoteQty": 5.14728,
    "price": 2573.64,
    "qty": 0.002,
    "isBestMatch": true,
    "id": 2468183370,
    "time": 1748329031938,
    "isBuyerMaker": true
  },
  {
    "quoteQty": 5.14728,
    "price": 2573.64,
    "qty": 0.002,
    "isBestMatch": true,
    "id": 2468183371,
    "time": 1748329031938,
    "isBuyerMaker": true
  }
]
                    

Result Mapping

A JSON Path expression defines where the retrieved trade data should be stored in the execution state. This allows for further use in downstream logic or visual representation.