General Info
Serious trading is about timing. Networks can be unstable and unreliable, which can lead to requests taking varying amounts of time to reach the servers. With recvWindow , you can specify that the request must be processed within a certain number of milliseconds or be rejected by the server.
SIGNED Endpoint Examples for POST /fapi/v1/order
Here is a step-by-step example of how to send a vaild signed payload from the Linux command line using echo , openssl , and curl .
| Key | Value |
|---|---|
| apiKey | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A |
| secretKey | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j |
| Parameter | Value |
|---|---|
| symbol | BTCUSDT |
| side | BUY |
| type | LIMIT |
| timeInForce | GTC |
| quantity | 1 |
| price | 0.1 |
| recvWindow | 5000 |
| timestamp | 1499827319559 |
Example 1: As a query string
Example 1
HMAC SHA256 signature:
queryString:
symbol=BTCUSDT
&side=BUY
&type=LIMIT
&timeInForce=GTC
&quantity=1
&price=0.1
&recvWindow=5000
×tamp=1499827319559
Example 2: As a request body
Example 2
HMAC SHA256 signature:
requestBody:
symbol=BTCUSDT
&side=BUY
&type=LIMIT
&timeInForce=GTC
&quantity=1
&price=0.1
&recvWindow=5000
×tamp=1499827319559
Example 3: Mixed query string and request body
Example 3
HMAC SHA256 signature:
- queryString: symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC
- requestBody: quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559
Note that the signature is different in example 3.
There is no & between "GTC" and "quantity=1".
Public Endpoints Info
Terminology
- base asset refers to the asset that is the quantity of a symbol.
- quote asset refers to the asset that is the price of a symbol.
ENUM definitions
Symbol type:
- FUTURE
Order status (status):
- NEW
- PARTIALLY_FILLED
- FILLED
- CANCELED
- REJECTED
- EXPIRED
Order types (orderTypes, type):
- LIMIT
- MARKET
- STOP
Order side (side):
- BUY
- SELL
Time in force (timeInForce):
- GTC — Good Till Cancel
- OC — Immediate or Cancel
- FOK — Fill or Kill
- GTX — Good Till Crossing (Post Only)
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
- 1m
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 6h
- 8h
- 12h
- 1d
- 3d
- 1w
- 1M
Rate limiters (rateLimitType)
Rate limit intervals (interval)
- SECOND
- MINUTE
- DAY
Filters
Filters define trading rules on a symbol or an exchange.
Symbol filters
PRICE_FILTER
The PRICE_FILTER defines the price rules for a symbol. There are 3 parts:
- minPrice defines the minimum price / stopPrice allowed; disabled on minPrice == 0.
- maxPrice defines the maximum price / stopPrice allowed; disabled on maxPrice == 0.
- tickSize defines the intervals that a price / stopPrice can be increased/decreased by; disabled on tickSize == 0.
Any of the above variables can be set to 0, which disables that rule in the price filter . In order to pass the price filter , the following must be true for price / stopPrice of the enabled rules:
- price >= minPrice
- price <= maxPrice
- ( price — minPrice ) % tickSize == 0
LOT_SIZE
The LOT_SIZE filter defines the quantity (aka "lots" in auction terms) rules for a symbol. There are 3 parts:
- minQty defines the minimum quantity allowed.
- maxQty defines the maximum quantity allowed.
- stepSize defines the intervals that a quantity can be increased/decreased by.
In order to pass the lot size , the following must be true for quantity :
- quantity >= minQty
- quantity <= maxQty
- ( quantity — minQty ) % stepSize == 0
MARKET_LOT_SIZE
The MARKET_LOT_SIZE filter defines the quantity (aka "lots" in auction terms) rules for MARKET orders on a symbol. There are 3 parts:
- minQty defines the minimum quantity allowed.
- maxQty defines the maximum quantity allowed.
- stepSize defines the intervals that a quantity can be increased/decreased by.
In order to pass the market lot size , the following must be true for quantity :
- quantity >= minQty
- quantity <= maxQty
- ( quantity — minQty ) % stepSize == 0
MAX_NUM_ORDERS
The MAX_NUM_ORDERS filter defines the maximum number of orders an account is allowed to have open on a symbol. Note that both "algo" orders and normal orders are counted for this filter.
PERCENT_PRICE
The PERCENT_PRICE filter defines valid range for a price based on the mark price.
In order to pass the percent price , the following must be true for price :
- price <= markPrice * multiplierUp
- price >= markPrice * multiplierDown
Market Data Endpoints
Test Connectivity
Test connectivity to the Rest API.
Weight: 1
Parameters: NONE
Check Server time
Test connectivity to the Rest API and get the current server time.
Weight: 1
Parameters: NONE
Exchange Information
Current exchange trading rules and symbol information
Weight: 1
Parameters: NONE
Order Book
Weight:
Adjusted based on the limit:
| Limit | Weight |
|---|---|
| 5, 10, 20, 50, 100 | 1 |
| 500 | 5 |
| 1000 | 10 |
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| limit | INT | NO | Default 100; max 1000. Valid limits:[5, 10, 20, 50, 100, 500, 1000] |
Recent Trades List
Get recent trades (up to last 500).
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| limit | INT | NO | Default 500; max 1000. |
Old Trades Lookup
Get older market historical trades.
Weight: 5
Parameters:
- X-MBX-APIKEY required
Compressed/Aggregate Trades List
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
Weight: 1
Parameters:
- If both startTime and endTime are sent, time between startTime and endTime must be less than 1 hour.
- If fromId, startTime, and endTime are not sent, the most recent aggregate trades will be returned.
Kline/Candlestick Data
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
Weight: 1
Parameters:
- If startTime and endTime are not sent, the most recent klines are returned.
Mark Price
Mark Price and Funding Rate
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES |
24hr Ticker Price Change Statistics
24 hour rolling window price change statistics.
Careful when accessing this with no symbol.
Weight:
1 for a single symbol;
40 when the symbol parameter is omitted
Parameters:
- If the symbol is not sent, tickers for all symbols will be returned in an array.
Symbol Price Ticker
Latest price for a symbol or symbols.
Weight:
1 for a single symbol;
2 when the symbol parameter is omitted
Parameters:
- If the symbol is not sent, prices for all symbols will be returned in an array.
Symbol Order Book Ticker
Best price/qty on the order book for a symbol or symbols.
Weight:
1 for a single symbol;
2 when the symbol parameter is omitted
Parameters:
- If the symbol is not sent, bookTickers for all symbols will be returned in an array.
Websocket Market Streams
- The base endpoint is: wss://testnet.binancefuture.com
- Streams can be access either in a single raw stream or a combined stream
- Raw streams are accessed at /ws/<streamName>
- Combined streams are accessed at /stream?streams=<streamName1>/<streamName2>/<streamName3>
- Combined stream events are wrapped as follows:
- All symbols for streams are lowercase
- The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed.
Aggregate Trade Streams
The Aggregate Trade Streams push trade information that is aggregated for a single taker order every 100 milliseconds.
Stream Name:
<symbol>@aggTrade
Mark Price Stream
Mark price for a single symbol pushed every 3 secends.
Stream Name:
<symbol>@markPrice
Kline/Candlestick Streams
The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing).
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
- 1m
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 6h
- 8h
- 12h
- 1d
- 3d
- 1w
- 1M
Stream Name:
<symbol>@kline_<interval>
Individual Symbol Mini Ticker Stream
24hr rolling window mini-ticker statistics for a single symbol pushed every 3 seconds. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before.
Stream Name:
<symbol>@miniTicker
Individual Symbol Ticker Streams
24hr rollwing window ticker statistics for a single symbol pushed every 3 seconds. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before.
Stream Name:
<symbol>@ticker
Partial Book Depth Streams
Bids and asks, pushed every 250 milliseconds (if existing)
Stream Name:
<symbol>@depth
How to manage a local order book correctly
- Open a stream to wss://testnet.binancefuture.com/stream?streams=btcusdt@depth.
- Buffer the events you receive from the stream. For same price, latest received update covers the previous one.
- Get a depth snapshot from https://testnet.binancefuture.com/fapi/v1/depth?symbol=BTCUSDT&limit=1000 .
- Drop any event where u is < lastUpdateId in the snapshot
- The first processed event should have U <= lastUpdateId AND u >= lastUpdateId
- While listening to the stream, each new event's pu should be equal to the previous event's u , otherwise initialize the process from step 3.
- The data in each event is the absolute quantity for a price level
- If the quantity is 0, remove the price level
- Receiving an event that removes a price level that is not in your local order book can happen and is normal.
Account/Trades Endpoints
New Order (TRADE)
POST /fapi/v1/order (HMAC SHA256)
Send in a new order.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| side | ENUM | YES | |
| type | ENUM | YES | |
| timeInForce | ENUM | NO | |
| quantity | DECIMAL | YES | |
| price | DECIMAL | NO | |
| newClientOrderId | STRING | NO | A unique id for the order. Automatically generated if not sent. |
| stopPrice | DECIMAL | NO | Used with STOP orders. |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Additional mandatory parameters based on type :
- Order with type MARKET , parameter timeInForce cannot be sent.
- Order with type STOP , parameter timeInForce can be sent ( default GTC ).
Query Order (USER_DATA)
GET /fapi/v1/order (HMAC SHA256)
Check an order's status.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| orderId | LONG | NO | |
| origClientOrderId | STRING | NO | |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
- Either orderId or origClientOrderId must be sent.
Cancel Order (TRADE)
DELETE /fapi/v1/order (HMAC SHA256)
Cancel an active order.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| orderId | LONG | NO | |
| origClientOrderId | STRING | NO | Automatically generated by default. |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Either orderId or origClientOrderId must be sent.
Current Open Orders (USER_DATA)
GET /fapi/v1/openOrders (HMAC SHA256)
Get all open orders on a symbol. Careful when accessing this with no symbol.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Parameters:
- If the symbol is not sent, orders for all symbols will be returned in an array.
All Orders (USER_DATA)
GET /fapi/v1/allOrders (HMAC SHA256)
Get all account orders; active, canceled, or filled.
Weight: 5 with symbol
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| orderId | LONG | NO | |
| startTime | LONG | NO | |
| endTime | LONG | NO | |
| limit | INT | NO | Default 500; max 1000. |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Notes:
- If orderId is set, it will get orders >= that orderId . Otherwise most recent orders are returned.
Account Information (USER_DATA)
GET /fapi/v1/account (HMAC SHA256)
Get current account information.
Weight: 5
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Position Information (USER_DATA)
GET /fapi/v1/positionRisk (HMAC SHA256) Get current account information.
Weight: 5
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Account Trade List (USER_DATA)
GET /fapi/v1/userTrades (HMAC SHA256)
Get trades for a specific account and symbol.
Weight: 5 with symbol
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| symbol | STRING | YES | |
| startTime | LONG | NO | |
| endTime | LONG | NO | |
| fromId | LONG | NO | TradeId to fetch from. Default gets most recent trades. |
| limit | INT | NO | Default 500; max 1000. |
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Notes:
- If fromId is set, it will get orders >= that fromId . Otherwise most recent orders are returned.
User Data Streams
- The base API endpoint is: https://testnet.binancefuture.com
- A User Data Stream listenKey is valid for 30 minutes after creation.
- Doing a PUT on a listenKey will extend its validity for 30 minutes.
- Doing a DELETE on a listenKey will close the stream.
- The base websocket endpoint is: wss://testnet.binancefuture.com
- User Data Streams are accessed at /ws/<listenKey>
- User data stream payloads are not guaranteed to be in order during heavy periods; make sure to order your updates using E
Start User Data Stream (USER_STREAM)
POST /fapi/v1/listenKey (HMAC SHA256)
Start a new user data stream. The stream will close after 30 minutes unless a keepalive is sent.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Keepalive User Data Stream (USER_STREAM)
PUT /fapi/v1/listenKey (HMAC SHA256)
Keepalive a user data stream to prevent a time out. User data streams will close after 30 minutes. It's recommended to send a ping about every 30 minutes.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Close User Data Stream (USER_STREAM)
DELETE /fapi/v1/listenKey (HMAC SHA256)
Close out a user data stream.
Weight: 1
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| recvWindow | LONG | NO | |
| timestamp | LONG | YES |
Event: Balance and Position Update
Event type is ACCOUNT_UPDATE .
When balance or position get updated, will push this event.
Event: Order Update
When new order created, order status changed will push such event. event type is ORDER_TRADE_UPDATE .
Side
- BUY
- SELL
Order Type
- MARKET
- LIMIT
- STOP
Execution Type
- NEW
- PARTIAL_FILL
- FILL
- CANCELED
- REJECTED
- CALCULATED — Liquidation Execution
- EXPIRED
- TRADE
- RESTATED
Order Status
- NEW
- PARTIALLY_FILLED
- FILLED
- CANCELED
- REPLACED
- STOPPED
- REJECTED
- EXPIRED
- NEW_INSURANCE — Liquidation with Insurance Fund
- NEW_ADL — Counterparty Liquidation`
Time in force
- GTC
- IOC
- FOK
- GTX
Error Codes
Here is the error JSON payload:
Errors consist of two parts: an error code and a message.
Codes are universal,but messages can vary.
10xx — General Server or Network issues
-1000 UNKNOWN
- An unknown error occured while processing the request.
-1001 DISCONNECTED
- Internal error; unable to process your request. Please try again.
-1002 UNAUTHORIZED
- You are not authorized to execute this request.
-1003 TOO_MANY_REQUESTS
- Too many requests queued.
- Too many requests; please use the websocket for live updates.
- Too many requests; current limit is %s requests per minute. Please use the websocket for live updates to avoid polling the API.
- Way too many requests; IP banned until %s. Please use the websocket for live updates to avoid bans.
-1004 DUPLICATE_IP
- This IP is already on the white list
-1005 NO_SUCH_IP
- No such IP has been white listed
-1006 UNEXPECTED_RESP
- An unexpected response was received from the message bus. Execution status unknown.
-1007 TIMEOUT
- Timeout waiting for response from backend server. Send status unknown; execution status unknown.
-1010 ERROR_MSG_RECEIVED
- ERROR_MSG_RECEIVED.
-1011 NON_WHITE_LIST
- This IP cannot access this route.
-1013 ILLEGAL_MESSAGE
- INVALID_MESSAGE.
-1014 UNKNOWN_ORDER_COMPOSITION
- Unsupported order combination.
-1015 TOO_MANY_ORDERS
- Too many new orders.
- Too many new orders; current limit is %s orders per %s.
-1016 SERVICE_SHUTTING_DOWN
- This service is no longer available.
-1020 UNSUPPORTED_OPERATION
- This operation is not supported.
-1021 INVALID_TIMESTAMP
- Timestamp for this request is outside of the recvWindow.
- Timestamp for this request was 1000ms ahead of the server's time.
-1022 INVALID_SIGNATURE
- Signature for this request is not valid.
11xx — Request issues
-1100 ILLEGAL_CHARS
- Illegal characters found in a parameter.
- Illegal characters found in parameter '%s'; legal range is '%s'.
-1101 TOO_MANY_PARAMETERS
- Too many parameters sent for this endpoint.
- Too many parameters; expected '%s' and received '%s'.
- Duplicate values for a parameter detected.
-1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED
- A mandatory parameter was not sent, was empty/null, or malformed.
- Mandatory parameter '%s' was not sent, was empty/null, or malformed.
- Param '%s' or '%s' must be sent, but both were empty/null!
-1103 UNKNOWN_PARAM
- An unknown parameter was sent.
-1104 UNREAD_PARAMETERS
- Not all sent parameters were read.
- Not all sent parameters were read; read '%s' parameter(s) but was sent '%s'.
-1105 PARAM_EMPTY
- A parameter was empty.
- Parameter '%s' was empty.
-1106 PARAM_NOT_REQUIRED
- A parameter was sent when not required.
- Parameter '%s' sent when not required.
-1108 BAD_ASSET
- Invalid asset.
-1109 BAD_ACCOUNT
- Invalid account.
-1110 BAD_INSTRUMENT_TYPE
- Invalid symbolType.
-1111 BAD_PRECISION
- Precision is over the maximum defined for this asset.
-1112 NO_DEPTH
- No orders on book for symbol.
-1113 WITHDRAW_NOT_NEGATIVE
- Withdrawal amount must be negative.
-1114 TIF_NOT_REQUIRED
- TimeInForce parameter sent when not required.
-1115 INVALID_TIF
- Invalid timeInForce.
-1116 INVALID_ORDER_TYPE
- Invalid orderType.
-1117 INVALID_SIDE
- Invalid side.
-1118 EMPTY_NEW_CL_ORD_ID
- New client order ID was empty.
-1119 EMPTY_ORG_CL_ORD_ID
- Original client order ID was empty.
-1120 BAD_INTERVAL
- Invalid interval.
-1121 BAD_SYMBOL
- Invalid symbol.
-1125 INVALID_LISTEN_KEY
- This listenKey does not exist.
-1127 MORE_THAN_XX_HOURS
- Lookup interval is too big.
- More than %s hours between startTime and endTime.
-1128 OPTIONAL_PARAMS_BAD_COMBO
- Combination of optional parameters invalid.
-1130 INVALID_PARAMETER
- Invalid data sent for a parameter.
- Data sent for paramter '%s' is not valid.
-2008 BAD_API_ID
- Invalid Api-Key ID
-2010 NEW_ORDER_REJECTED
- NEW_ORDER_REJECTED
-2011 CANCEL_REJECTED
- CANCEL_REJECTED
-2013 NO_SUCH_ORDER
- Order does not exist.
-2014 BAD_API_KEY_FMT
- API-key format invalid.
-2015 REJECTED_MBX_KEY
- Invalid API-key, IP, or permissions for action.
-2016 NO_TRADING_WINDOW
- No trading window could be found for the symbol. Try ticker/24hrs instead.
-4000 INVALID_ORDER_STATUS
- Invalid order status.
-4001 PRICE_LESS_THAN_ZERO
- Price less than 0.
-4002 PRICE_GREATER_THAN_MAX_PRICE
- Price greater than max price.
-4003 QTY_LESS_THAN_ZERO
- Quantity less than zero.
-4004 QTY_LESS_THAN_MIN_QTY
- Quantity less than min quantity.
-4005 QTY_GREATER_THAN_MAX_QTY
- Quantity greater than max quantity.
-4006 STOP_PRICE_LESS_THAN_ZERO
- Stop price less than zero.
-4006 STOP_PRICE_GREATER_THAN_MAX_PRICE
- Stop price greater than max price.
Messages for -1010 ERROR_MSG_RECEIVED, -2010 NEW_ORDER_REJECTED, and -2011 CANCEL_REJECTED
This code is sent when an error has been returned by the matching engine. The following messages which will indicate the specific error:
Типы создания ключей API
В настоящее время существует два варианта создания ключей API на бирже Binance:
Быстрое подключение Binance API
Быстрое подключение Binance API — это подсистема Binance API, использующая протокол OAuth 2.0 для аутентификации и авторизации пользователей. Она помогает быстро авторизовать определенные разрешения аккаунта, создавать API ключи и автоматически подключать их к Bitsgap. Данная функция позволяет вам начать использовать сервисы Bitsgap без ручного создания ключей API. Эта система безопасна, поскольку все сгенерированные ключи API передаются в Bitsgap в зашифрованном виде. Чтобы настроить API ключ, пожалуйста, выполните следующие действия:
1. Откройте фьючерсный счет (необязательно)
Войдите в свой аккаунт Binance.
Примечание. Данный шаг необходим, если вы хотите подключить свой аккаунт Binance Futures. Вы можете пропустить этот шаг, если торгуете только на спотовом рынке.
Перейдите в свой Кошелек > Фьючерсный кошелек и следуйте инструкциям, предоставленным биржей Binance. Когда вы выполните все шаги, ваша учетная запись Binance Futures будет открыта, что позволит вам торговать фьючерсами через Bitsgap.
2. Перейдите на страницу Bitsgap > Мои биржи
Войдите в свой аккаунт Bitsgap и перейдите на страницу “Мои биржи”, а затем нажмите кнопку [Добавить новую биржу].
3. Выберите Binance из списка, далее “Быстрое подключение”
Ознакомьтесь с дальнейшими шагами, а затем нажмите [Подключить].
4. Войдите в свой аккаунт на Binance
Вы будете перенаправлены на веб-сайт Binance, где сможете войти в свою учетную запись.
Примечание: быстрое создание ключа API не предоставляет доступ к вашему аккаунту и не передает никакую личную или конфиденциальную информацию.
5. Проверка соединения
После успешной авторизации и создания API вы будете автоматически перенаправлены на страницу “Мои биржи” в Bitsgap. Ключ API будет создан и добавлен автоматически.
Если все сделано правильно, вы увидите, что биржа Binance добавлена в список ваших подключенных бирж со статусом Подключена и торговым балансом, доступным в вашем аккаунте.
Настройка API ключа на бирже Binance
![]()
Для начала работы с ботом вам нужно получить API-ключ в личном кабинете на бирже Бинанс. API- key состоит из двух ключей, сам API- key + Secret-key.
Для создания API ключа необходимо:
- Зайти в аккаунт на https://www.binance.com
2. В вашем личном кабинете на бирже Binance есть вкладка Центр пользователя. Она находится в верхнем правом углу, рядом с выбором языков. Наведите курсор мышки на иконку человечка и появится ниспадающее меню, в нем вам нужно выбрать — Центр пользователя. На странице Центр пользователя переходим по ссылке — Параметры API.
3. Далее вам нужно ввести название для вашего будущего API ключа. Например — Cryptocurrency Assistant и нажать на кнопку Создать новый ключ.
4. После этого вам будет отправлено письмо в котором нужно перейти по ссылке или нажать на кнопку Confirm Create. Письмо посылается на адрес электронной почты, который вы указали при регистрации на бирже.
Вы подтвердите создание API ключа и перейдете на страницу с данными ключа. На изображении ниже видно, что ключ создан.
6. После создания ключа нужно нажать на Редактировать и снять галочку напротив Разрешить торговать. Тем самым вы запрещаете ведение торговли через этот ключ.
Оставляем только возможность получать через данный API-ключ информацию о вашем аккаунте.
Запуск бота
Как запустить бота Cryptocurrency Assistant?
Укажите API ключ в начале работы с ботом. Боту требуется несколько минут для сбора всей статистики по вашему аккаунту. Когда бот будет готов к работе вы получите уведомление — Поздравляем! Данные успешно собраны. Можно приступать к работе.
После этого вы сможете получать отчеты и уведомления о торговых операциях.
Api ключи бинанс что это
Компания Tradingstar открывает свое облако VDS серверов для клиентов.
VDS VPS сервера от TradingStar это идеально настроенные и оптимизированные виртуальные сервера для запуска ботов на крипто биржах.
1-код каркас меню
Создание и настройка API ключей на бирже Binance.
Все тонкости.
МОИ САЙТЫ ⟶ TRADINGSTAR ПредпросмотрОпубликоватьНастройкиПомощьЕще HEADER Важно: разместите этот блок на самом верху страницы. Этот блок добавляет анимацию загрузки страницы. Создание и настройка API ключей на бирже Binance. Все тонкости. T123 Настройки Контент HTML-код
Оглавление:
1. Ключ API биржи Binance
Ключ API биржи Binance — это цифровой код, позволяющей внешней программе от вашего имени производить действия на бирже. Ключ API потому и называется КЛЮЧ, что это просто набор цифр, известных только Вам и бирже и на основании ключа происходит открытие действий для биржи от вашего имени.
Ключ делится на открытый (API-key) и закрытый ключ (Secret Key), открытый ключ можно как следует из названия по запросу открыто предоставлять. Закрытый ключ необходимо хранить в тайне и предоставлять только вашему брокеру и в программе в которой будет осуществляться торговля на бирже.
2. Создание API ключа на бирже Binance
- Перед созданием API-ключа мы рекомендуем пройти двухфакторную аутентификацию (2FA). На сегодняшний день без данного уровня невозможно уже на бирже Binance осуществлять операции.
- Логинимся в Binance. https://accounts.binance.com/ru/login
- Через главную иконку "Центра пользователя" Переходим на закладку "Управления API" https://www.binance.com/ru/my/settings/api-management

- В верхнем поле создаем метку ключа API например "API_TradingStar"и нажимаем кнопку "API создан"

- Проходим проверку кодов доступа.
- API ключ создан, обязательно записываем открытый (API-key) и закрытый ключ (Secret Key) себе в секретное место. Секретный ключ надо сразу понимать Вы больше никогда не увидите если закроете эту страницу.
Надо понимать, что ключ при создании имеет минимальные права и для торговли нам не подходит. Увеличим права ключа и потому нажимаем "Редактировать ограничения".

- Обязательно включаем спотовую торговлю и фьючерсы (1 и 2 на рисунке).
- Обращаем внимание на пункт "Ограничение доступа по IP". (3 на рисунке) Очень важный момент.
Если мы выберем — "Неограниченный", то созданный API ключ будет действовать только 3 месяца, а потом автоматически отключится.
Если мы выберем — "Разрешить доступ только к доверенным IP-адресам", то созданный API ключ будет действовать вечно. Желательно выбирать этот пункт, так как при работе из дома вы свой IP знаете, если будете работать через VDS сервер, то там тоже IP будет назначен.
- После того как вкдючили галочки, нажимаем "Сохранить"

- Если мы на предыдущем пункте выбрали "Неограниченный" то возникнет окно предупреждающее, что через 90 дней API будет отключен. Нажимаем "Ok"

- Проходим проверку безопасноси и на этом наш API ключ создан.
3. Подключение API ключа в программе TradingStar
- Запускаем программу TradingStar, и в разделе Настройки ввести ранее полученный ключ.

Следует отметить, что API ключ в программе TradingStar проходит верификацию при работе программы, т.е. ключ должен быть зарегистрирован у авторов программы. Если просто ввести ключ API в программу, то программа выдаст ошибку о проверке ключа (крайне правое поле).