Bybit cryptocurrencyexchanges - cashback 20% - Registration Binance cryptocurrencyexchanges - Registration - cashback 10% KoCoin Cryptocurrency Exchange - cashback 20%
0 votes
by (41.6k points)
Introduction.
Our WebSocket Steams offer access to:
Market data streams User data streams.
General API Information.
The base endpoint is: https://api.binance.us.
All endpoints return either a JSON object or array.
Data is returned in ascending order. oldest first, newest last.
All time and including for staking, referrals and airdrops etc fields are in milliseconds .
Making Requests.
For GET endpoints, parameters must be sent as a query string . For POST , PUT , and DELETE endpoints, the parameters may be sent as a query string or in the request body with content type application/x-www-form-urlencoded . You may mix parameters between both the query string and request body if you wish to do so. Parameters may be sent in any order. If a parameter is sent in both the query string and request body , the query string parameter will be used.
Data Sources.
The API system is asynchronous, so some delay in the response is normal. Each endpoint has a data source indicating where the data is being retrieved, and thus which endpoints have the most up-to-date response.
These are the three sources ordered by which have the most up-to-date response to the one with potential delays in updates:
Matching Engine - the data is from the matching engine Memory - the data is from a server's local or external memory Database - the data is taken directly from a database.
Some endpoints can have more than one data source. (e.g. Memory => Database) This means that the endpoint will check the first data source, and if it cannot find the value it's looking for it will check the next one.
API Terminology.
These terms will be used throughout the documentation, so it is recommended especially for new users to read to help their understanding of the API.
Base asset refers to the asset that is the quantity of a symbol; for the symbol BTCUSDT, BTC would be the base asset. Quote asset refers to the asset that is the price of a symbol; for the symbol BTCUSDT, USDT would be the quote asset .
Enum Definitions.
Symbol status (status):
PRE_TRADING TRADING POST_TRADING END_OF_DAY HALT AUCTION_MATCH BREAK.
Symbol type:
Order status (status):
Status Description NEW The order has been accepted by the engine. PARTIALLY_FILLED Part of the order has been filled. FILLED The order has been completed. CANCELED The order has been canceled by the user. PENDING_CANCEL This is currently unused. REJECTED The order was not accepted by the engine and not processed. EXPIRED The order was canceled according to the order type's rules (e.g., LIMIT FOK orders with no fill, LIMIT IOC or MARKET orders that partially fill) or by the exchange; (e.g., orders canceled during liquidation or orders canceled during maintenance)
OCO Status (listStatusType):
Status Description RESPONSE This is used when the ListStatus is responding to a failed action. (e.g., Orderlist placement or cancelation) EXEC_STARTED The order list has been placed, or there is an update to the order list status. ALL_DONE The order list has finished executing and thus no longer active.
OCO Order Status (listOrderStatus):
Status Description EXECUTING Either an order list has been placed or there is an update to the status of the list. ALL_DONE An order list has completed execution and is thus no longer active. REJECT The List Status is responding to a failed action either during order placement or the order was canceled.
ContingencyType.
Order types (orderTypes, type):
LIMIT MARKET STOP_LOSS STOP_LOSS_LIMIT TAKE_PROFIT TAKE_PROFIT_LIMIT LIMIT_MAKER.
Order side (side):
Time in force (timeInForce):
Status Description GTC "Good Till Canceled" An order will be on the book unless the order is canceled. IOC "Immediate or Cancel" An order will try to fill the order as much as it can before the order expires. FOK "Fill or Kill" An order will expire if the full order cannot be filled upon execution.
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months.
Rate limiters (rateLimitType)
REQUEST_WEIGHT ORDERS RAW_REQUESTS.
Rate limit intervals (interval)
Authentication.
Get API Keys.
Creating a private API key provides access to markets and real-time trading services on Binance.US via a third-party site or application.
To create an API key, log in to Binance.US with your account details and go to Settings > API management.
Authentication Types.
Each endpoint has a security type that determines how you will interact with it. This is stated next to the NAME of the endpoint. If no security type is stated, assume the security type is NONE.
Authentication Timing.
A SIGNED endpoint also requires a parameter and timestamp to be sent, binance forgot password which should be the millisecond timestamp of when the request was created and mona m binance sent. An additional parameter, recvWindow , may be sent to specify the number of milliseconds after the timestamp request is valid for. If recvWindow is not sent, バイナンスハッシュグラフ it defaults to 5,000 . he exact timing authentication logic can be viewed in the code sample on the right panel (or below on a mobile device).
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.
Signature Authentication.
Example 1 As a request body.
Example 2 As a query string.
Example 3 Mixed query string and request body.
SIGNED endpoints require an additional parameter, signature , to be sent in the query string or binance palaišanas baseina pārskats request body . Endpoints use HMAC SHA256 signatures. The HMAC SHA256 signature is a keyed HMAC SHA256 operation. Use your secretKey as the key and totalParams as the value for the HMAC operation. The signature is not case sensitive . totalParams is defined as the query string concatenated with the request body .
Here is a step-by-step example of how to send a valid signed payload from the Linux command समीक्षा में द्वैत वर्ष line using echo , OpenSSL , and cURL .
Key Value apiKey vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A secretKey NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j Parameter Value symbol LTCBTC side BUY type LIMIT timeInForce GTC quantity 1 price 0.1 recvWindow 5000 timestamp 1499827319559.
Error Responses.
Errors consist of two parts: binance klienta recenzo an error code and a message. Codes are universal, but messages can vary. Here is the error JSON payload:
HTTP Errors.
HTTP 4XX return codes are used for malformed requests; the issue is on the sender's side. HTTP 403 return code is used when the WAF Limit (Web Application Firewall) has been violated. HTTP 429 return code is used when breaking a request rate limit. HTTP 418 return code is used when an IP has been auto-banned for continuing to send requests after receiving 429 codes. HTTP 5XX return codes are used for internal errors; the issue is on Binance's side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success.
Server/Network Errors.
- 1000 UNKNOWN.
An unknown error occurred 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 much request weight used; IP banned until %s. Please use the WebSocket for live updates to avoid bans.
- 1006 UNEXPECTED_RESP.
An unexpected response was received from the message bus.

Please log in or register to answer this question.

Welcome to Forex binaryoption Q&A, where you can ask questions and receive answers from other members of the community. Forex binaryoption forum
Servet rental crypto
Авиатор-как поднять бабла
एविएटर - ऑनलाइन पैसा कमाना कितना आसान है।
Confira o Slot Aviator – um divertido jogo de apostas onde você pode ganhar até 2000x
...