Barcode error parameter msg must not be empty перевод

I´m getting this strange error when trying to put a barcode in a report with Ireport. I´ve already created a parameter named 'msg' but I keep getting this error. What´s the problem?

I had the same issue and for what I could see, many have the same issue. I am no good in Jasper but here is my solution to it. 

Cause: The issue comes due to absence of value in the barcode property in appearance under print when section for the option: Print When Expression. 

Solution: Caste a boolean return for the barcode value, with something like this: $F{BARCODE}.contains( $F{BARCODE} )

Short explanation: This value is passed, in my understanding as MSG parameter to the barcode generator barcode4j. When null, it throws exception as expected. So we need to set a value. The value expected is of type boolean. I had a field that was named BARCODE. so I just put a code as above which says check if Barcode string has Barcode string value. WHich is like saying when 1=1. This returns a boolean value. Hence all conditions are met. When the field has a value, you will see the barcode in the output. 

Why I broke my head on this solution and not just replaced it with barbecue: When i changed the barcode type, the format changed and the guys using the output were just not happy as visually it looked different. So I had to use barcode4j and I had to fix the issue. Hope it helps. Cheers. 

I had the same issue and for what I could see, many have the same issue. I am no good in Jasper but here is my solution to it. 

Cause: The issue comes due to absence of value in the barcode property in appearance under print when section for the option: Print When Expression. 

Solution: Caste a boolean return for the barcode value, with something like this: $F{BARCODE}.contains( $F{BARCODE} )

Short explanation: This value is passed, in my understanding as MSG parameter to the barcode generator barcode4j. When null, it throws exception as expected. So we need to set a value. The value expected is of type boolean. I had a field that was named BARCODE. so I just put a code as above which says check if Barcode string has Barcode string value. WHich is like saying when 1=1. This returns a boolean value. Hence all conditions are met. When the field has a value, you will see the barcode in the output. 

Why I broke my head on this solution and not just replaced it with barbecue: When i changed the barcode type, the format changed and the guys using the output were just not happy as visually it looked different. So I had to use barcode4j and I had to fix the issue. Hope it helps. Cheers. 


На основании Вашего запроса эти примеры могут содержать грубую лексику.


На основании Вашего запроса эти примеры могут содержать разговорную лексику.


Verifies that the input parameters are not empty, 0, or negative.



Проверяет, что входные параметры не пусты, не равны нулю и не являются отрицательными.


If the action parameter text is not empty, it is used as the error report text.



Если параметр действия не пустой, то он используется как текст уведомления об ошибке.


If the HTTP request contains the Redirect parameter and the RedirectAddresses parameter is not empty, the message is redirected to the specified addresses.



Если запрос НТТР содержит параметр Redirect, и параметр RedirectAddresses не является пустым, то сообщение перенаправляется на указанные адреса.


If the HTTP request contains the Rename parameter and the NewName parameters is not empty, the Mailbox is renamed.



Если запрос НТТР содержит параметр Rename, а параметр NewName не является пустым, то папка переименовывается.

Ничего не найдено для этого значения.

Результатов: 2595. Точных совпадений: 1. Затраченное время: 94 мс

Documents

Корпоративные решения

Спряжение

Синонимы

Корректор

Справка и о нас

Индекс слова: 1-300, 301-600, 601-900

Индекс выражения: 1-400, 401-800, 801-1200

Индекс фразы: 1-400, 401-800, 801-1200

I’m having trouble generating a dynamic message using Barcode4J ean-13 in an Apache FOP xsl document. I did get the barcode to generate using a hard coded message. However, I would like to pass the barcode number to the xsl document as a parameter. How do I go about doing that?

Also, I have referred to the barcode4J site for help page with no luck. I have tried using the technique described here but had no luck.

This is how my xsl document looks like

<fo:block-container left="1000" top="1000"
            z-index="1" position="relative">
            <fo:block>
                <fo:instream-foreign-object>
                    <bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns"
                        message="123456789789">
                        <bc:ean-13 />
                    </bc:barcode>
                </fo:instream-foreign-object>
            </fo:block>
        </fo:block-container>

asked Aug 31, 2015 at 11:07

Marcel Palm's user avatar

You don’t say which XSLT version you are using.

If you want to pass a parameter to your XSLT, you need to declare the parameter as a child element of your xsl:stylesheet, e.g.:

<xsl:param name="barcode" />

For XSLT 1.0, see http://www.w3.org/TR/xslt#top-level-variables. You could declare more about it if you are using XSLT 2.0.

How to pass the parameter value will depend on which XSLT processor you are using, but you can expect that to be covered in the XSLT processor’s documentation.

You can then use the $barcode parameter in an ‘attribute value template’ in your otherwise-literal markup:

<fo:block-container left="1000" top="1000"
        z-index="1" position="relative">
        <fo:block>
            <fo:instream-foreign-object>
                <bc:barcode xmlns:bc="http://barcode4j.krysalis.org/ns"
                    message="{$barcode}">
                    <bc:ean-13 />
                </bc:barcode>
            </fo:instream-foreign-object>
        </fo:block>
    </fo:block-container>

For attribute value templates in XSLT 1.0, see http://www.w3.org/TR/xslt#dt-attribute-value-template

answered Aug 31, 2015 at 15:37

Tony Graham's user avatar

Tony GrahamTony Graham

7,01613 silver badges20 bronze badges

7

  1. Error description
  2. Short error description in the response
  3. Example of an error message

If an error occurs, the request processing stops, and the server returns an HTTP response code that identifies the error. In addition to the code, the response contains a short error description.

The error message is returned in the format specified in the request URL after the method name or in the Accept HTTP header.

The error description is passed in the error parameter. This parameter contains the error code (the code parameter) and a short error description (the message parameter).

Code

Name

Explanation

200

OK

The request is successfully completed.

206

Partial Content

The request is partially completed.

400

Bad Request

The request is invalid.

401

Unauthorized

The request doesn’t include authorization data.

403

Forbidden

Incorrect authorization data is specified in the request, or access to the requested resource is denied.

404

Not Found

The requested resource isn’t found.

405

Method Not Allowed

The requested method isn’t supported for the specified resource.

415

Unsupported Media Type

The requested content type isn’t supported by the method.

420

Enhance Your Calm

The resource access restriction is exceeded.

500

Internal Server Error

Internal server error. Try calling the method after a while. If the error persists, contact the Yandex.Market support service.

503

Service Unavailable

The server is temporarily unavailable due to high load. Try calling the method after a while.

  • For the 400 Bad Request error:

    Description

    Explanation

    Possible solution

    Collection of field must not be empty

    The parameter must not be empty.

    Specify at least one element for the parameter.

    Invalid status: 'status'

    Invalid status is specified.

    Check if the sent status is correct for order filtering by status.

    JSON: {message}

    The JSON data format contains an error.

    Check if the data passed in the request body has the correct JSON format.

    Missing field

    The required parameter isn’t specified.

    Specify a value for the required parameter.

    The request is too big

    The HTTP request size limit is exceeded.

    Cut the request size by reducing the amount of the sent data.

    Too long time period. Maximum is 'maxPeriod' days

    The specified date range is too large. Maximum range — maxPeriod.

    Reduce the date range to filter orders by date.

    Unexpected character 'character': expected a valid value 'values'

    Invalid character.

    Check the request body encoding. The required encoding is UTF-8.

    Unexpected end of content

    The request body ends unexpectedly.

    Check if the data passed in the request body has the correct format.

    Value / length of field (value) must be between min and max [exclusively]

    The parameter value (length) must be between the min and max values and not equal to them.

    Check if the parameter value is correct.

    Value / length of field (value) must be greater / less than [or equal to] limit

    The parameter value (length) must be equal to or greater than (less than) the specified limit value.

    Check if the parameter value is correct.

    Value of field has too high scale: 'price'

    The accuracy of the parameter is set too high.

    Set the parameter values with less precision.

    Value of field must match the pattern: 'regExp'

    The parameter value must match the regular expression.

    Check if the parameter value is correct.

    XML: {message}

    The XML data format contains an error.

    Check if the data passed in the request body has the correct XML format.

    Other short descriptions that can be found in messages about this error are provided in the descriptions of the corresponding resources.

  • For the 401 Unauthorized error:

    Description

    Explanation

    Possible solution

    Unsupported authorization type specified in Authorization header

    Authorization type passed in the Authorization HTTP header isn’t supported.

    Check if the authorization data is correct.

    Authorization header has invalid syntax

    The Authorization HTTP header format is incorrect.

    Check if the authorization data is correct.

    OAuth credentials are not specified

    The request doesn’t include authorization data.

    Check that the authorization data is correct.

    OAuth token is not specified

    The request doesn’t include the authorization token (the oauth_token parameter).

    Check if the authorization data is correct.

    OAuth client id is not specified

    The request doesn’t include the application ID (the oauth_client_id parameter).

    Check if the authorization data is correct.

  • For the 403 Forbidden error:

    Description

    Explanation

    Possible solution

    Access denied

    Access to the specified resource is prohibited.

    Check if the resource is specified correctly, and if the authorized user login has access to it.

    Access to API denied for the client / campaign

    The client or store isn’t allowed to access the Yandex.Market Partner API.

    Agency clients should contact their agency about getting access to the Yandex.Market Partner API.

    Client id is invalid

    The specified application ID (the oauth_client_id parameter) is invalid.

    Check if the authorization data is correct. If they are correct, get a new app ID, repeat the request with the new authorization data.

    Scope is invalid

    The specified authorization token (the oauth_token parameter) doesn’t have the necessary set of rights.

    Get a new authorization token, mention the right to use the Yandex.Market Partner API when you receive it, and repeat the request with the new authorization data.

    Token is invalid

    The specified authorization token (parameter oauth_token) is invalid.

    Check if the authorization data is correct. If they are correct, get a new authorization token, repeat the request with the new authorization data.

    User account is disabled

    The user account for which the specified authorization token was issued is blocked.

    Contact the Yandex.Market support service.

  • For the 404 Not Found error:

    Description

    Explanation

    Possible solution

    Feed not found: 'feedId'

    The price list specified in the request isn’t found.

    Check if the sent price list ID is correct.

    Login not found: 'login'

    The username specified in the request isn’t found.

    Check if the sent username is correct.

    Model not found: 'modelId'

    The model specified in the request isn’t found.

    Check if the model ID you are passing is correct.

  • For the 405 Method Not Allowed error:

    Description

    Explanation

    Possible solution

    Request method 'method' not supported

    The requested HTTP method isn’t supported.

    Check the methods supported by the resource. You can find the list of methods in the Requests reference section.

  • For the 415 Unsupported Media Type error:

    Description

    Explanation

    Possible solution

    Content type 'content-type' not supported

    The requested content type isn’t supported.

    Pass one of the supported content types.

    Missing Content-Type

    The content type isn’t specified.

    Pass the content type.

    Unknown content-type: 'content-type'

    The requested content type is unknown.

    Pass one of the supported content types.

  • For the 420 Enhance Your Calm error:

    Description

    Explanation

    Possible solution

    Hit rate limit of 'N' parallel requests

    Exceeded the global limit on the number of simultaneous requests to the Yandex.Market Partner API.

    Reduce the number of concurrent requests to the partner API within a single store or partner to N requests.

    Hit rate limit of 'N' requests per 'period' for resource 'R'

    The resource restriction for the N number of requests to the R resource over the period for the same store or partner is exceeded.

    The time until which the limit applies is specified in the X-RateLimit-Resource-Until header. You can use of the resource after the specified time.

  • For the 503 Service Unavailable error:

    Description

    Explanation

    Possible solution

    Service temporarily unavailable. Please, try again later

    The server is temporarily unavailable due to high load.

    Try repeating the request after a while.

Request example:

GET /v2/campaigns.xml HTTP/1.1
Host: api.partner.market.yandex.ru
Accept: */*
Authorization: OAuth oauth_token=,oauth_client_id=b12320932d4e401ab6e1ba43d553d433

Response example:

<response>
  <errors>
    <error code="UNAUTHORIZED" message="OAuth token is not specified"/>
  </errors>
  <error code="401">
    <message>OAuth token is not specified</message>
  </error>
</response>

Request example:

GET /v2/campaigns.json HTTP/1.1
Host: api.partner.market.yandex.ru
Accept: */*
Authorization: OAuth oauth_token=,oauth_client_id=b12320932d4e401ab6e1ba43d553d433

Response example:

{
  "errors":
  [
    {
      "code": "UNAUTHORIZED",
      "message": "OAuth token is not specified"
    }
  ],
  "error":
  {
    "code": 401,
    "message": "OAuth token is not specified"
  }
}

The tank must not be empty, otherwise no engine start

is

possible after switching off the ignition.

Those measures should not be empty slogans but they must

be

put into action through realistic measures that will

lead to actual nuclear disarmament.

Эти меры не

должны 

носить чисто декларативный характер, а должны находить воплощение в практических мероприятиях, ведущих

к реальному ядерному разоружению.

The transducer is factory-adjusted(4 mA empty vessel; 20 mA full vessel) and must not be changed.

Реле уровня уже были отъюстированы на заводе( 4 мА пустой резервуар; 20 мА полный резервуар) и не подлежат последующей перенастройке.

Paul further emphasized, that the proclamation must not be shaped through sensitive emotions or empty rhetoric,“For the kingdom of God

is not

in word,

but in power”(1 Corinthians 4:20).

Далее Павел указывает на то, что проповедь должна быть основана не на высоких чувствах или пустой риторике, ибо« Царство Божие

не

в слове,

а в силе»( 1- е Коринфянам 4, 20).

Finally, Costa Rica is of the view that, in order to achieve all that I have mentioned— albeit gradually, but also progressively and sustainably— the pledges made at

the 12 June Paris Conference must not be

empty

promises: the $20 billion pledged

must be

disbursed in keeping with the needs expressed and the plans made.

Наконец, Коста-Рика считает, что для достижения всего того, что я перечислил,— пусть постепенно, но поступательно и последовательно,— обязательства,

взятые на Парижской конференции 12 июня, должны быть выполнены: 20 млрд. долл. США

должны быть

выделены согласно ранее заявленным потребностям и подготовленным планам.

To realize those goals, our debate of this topic must not

be

reduced to empty rhetoric and nice language.

Для реализации этих целей наши прения по этой теме не должны сводиться к пустым и красивым словам.

In the latter case the next square(which

is

jumped over) must be empty.

Packaging things in a suitcase,

be

sure to check all pockets- they must be empty.

The rights of indigenous peoples

must 

not be

empty

rights.

Sustainable development must not

be

allowed to become an

empty

concept.

Нельзя допускать, чтобы устойчивое развитие превратилось в пустую концепцию.

If there

is

an

empty

space above the ceiling of the steam room, it must not

be

completely sealed off.

При наличии свободного места над потолком парной его не следует изолировать полностью.

We

must 

not be like small children, who

are

courageous today but may tremble with fear over an

empty

phantom tomorrow.

Не будем как малые дети, которые сегодня смелы, но завтра могут дрожать от пустого призрака.

The review process, as both a diagnostic instrument for assessing the health of the Treaty and

a means of improving it, must not

be

permitted to become an empty ritual that simply reaffirmed the status quo.

Процесс обзора— и как диагностический инструмент, позволяющий оценить<< состояние здоровья>gt; Договора,

и как средство его улучшения— не должен превратиться в пустой ритуал, всего лишь подтверждающий статус кво.

Результатов: 43641,
Время: 0.2821

Список типичных ошибок и как их исправить

`missing mandatory field: text` — встречается в Viber, если пытаетесь отправить пустой текст сообщения. Заполните блок сообщения текстом и отправьте заново.

`Vk error:One of the parameters specified was missing or invalid: message is empty or invalid` — встречается во Вконтакте, если пытаетесь отправить пустой текст сообщения. Заполните блок сообщения текстом и отправьте заново.

`(#100) Length of param name_placeholder[text] must be less than or equal to 640` или `(#100) Length of param message[text] must be less than or equal to 2000` — встречается в Facebook Messenger, если пытаетесь отправить слишком длинный текст сообщения. Рекомендуем отправлять сообщения не более 600 символов.

`Error:SyntaxError: Unexpected end of input` — встречается во Вконтакте, если не правильно выстроили логику бота, чаще всего в условном блоке. Проверьте условие в условном блоке и повторите попытку.

`Bad Request: BUTTON_DATA_INVALID` — встречается в Telegram, превышено количество символов в инлайн кнопке (серого цвета в области диалога). Исправьте, чтобы в тексте кнопки было не более 21 символа считая пробелы.

Остались вопросы?

Напишите нам в техническую поддержку

Содержание

  1. Не могу зайти на Binance
  2. Не могу зайти на Binance
  3. 1. Самые частые причины проблем с входом
  4. 2. Аккаунт заморожен Binance
  5. 3. Другие причины
  6. Выводы
  7. Обход 2FA на Binance и потеря 200000$
  8. Change Log
  9. General Info
  10. General API Information
  11. LIMITS
  12. Endpoint Security Type
  13. SIGNED (TRADE and USER_DATA) Endpoint Security
  14. Timing security
  15. SIGNED Endpoint Examples for POST /fapi/v1/order
  16. Example 1: As a query string
  17. Example 2: As a request body
  18. Example 3: Mixed query string and request body
  19. Public Endpoints Info
  20. Terminology
  21. ENUM definitions
  22. Filters
  23. Symbol filters
  24. PRICE_FILTER
  25. LOT_SIZE
  26. MARKET_LOT_SIZE
  27. MAX_NUM_ORDERS
  28. PERCENT_PRICE
  29. Market Data Endpoints
  30. Test Connectivity
  31. Check Server time
  32. Exchange Information
  33. Order Book
  34. Recent Trades List
  35. Old Trades Lookup
  36. Compressed/Aggregate Trades List
  37. Kline/Candlestick Data
  38. Mark Price
  39. 24hr Ticker Price Change Statistics
  40. Symbol Price Ticker
  41. Symbol Order Book Ticker
  42. Websocket Market Streams
  43. Aggregate Trade Streams
  44. Mark Price Stream
  45. Kline/Candlestick Streams
  46. Individual Symbol Mini Ticker Stream
  47. Individual Symbol Ticker Streams
  48. Partial Book Depth Streams
  49. How to manage a local order book correctly
  50. Account/Trades Endpoints
  51. New Order (TRADE)
  52. Query Order (USER_DATA)
  53. Cancel Order (TRADE)
  54. Current Open Orders (USER_DATA)
  55. All Orders (USER_DATA)
  56. Account Information (USER_DATA)
  57. Position Information (USER_DATA)
  58. Account Trade List (USER_DATA)
  59. User Data Streams
  60. Start User Data Stream (USER_STREAM)
  61. Keepalive User Data Stream (USER_STREAM)
  62. Close User Data Stream (USER_STREAM)
  63. Event: Balance and Position Update
  64. Event: Order Update
  65. Error Codes
  66. 10xx — General Server or Network issues
  67. -1000 UNKNOWN
  68. -1001 DISCONNECTED
  69. -1002 UNAUTHORIZED
  70. -1003 TOO_MANY_REQUESTS
  71. -1004 DUPLICATE_IP
  72. -1005 NO_SUCH_IP
  73. -1006 UNEXPECTED_RESP
  74. -1007 TIMEOUT
  75. -1010 ERROR_MSG_RECEIVED
  76. -1011 NON_WHITE_LIST
  77. -1013 ILLEGAL_MESSAGE
  78. -1014 UNKNOWN_ORDER_COMPOSITION
  79. -1015 TOO_MANY_ORDERS
  80. -1016 SERVICE_SHUTTING_DOWN
  81. -1020 UNSUPPORTED_OPERATION
  82. -1021 INVALID_TIMESTAMP
  83. -1022 INVALID_SIGNATURE
  84. 11xx — Request issues
  85. -1100 ILLEGAL_CHARS
  86. -1101 TOO_MANY_PARAMETERS
  87. -1102 MANDATORY_PARAM_EMPTY_OR_MALFORMED
  88. -1103 UNKNOWN_PARAM
  89. -1104 UNREAD_PARAMETERS
  90. -1105 PARAM_EMPTY
  91. -1106 PARAM_NOT_REQUIRED
  92. -1108 BAD_ASSET
  93. -1109 BAD_ACCOUNT
  94. -1110 BAD_INSTRUMENT_TYPE
  95. -1111 BAD_PRECISION
  96. -1112 NO_DEPTH
  97. -1113 WITHDRAW_NOT_NEGATIVE
  98. -1114 TIF_NOT_REQUIRED
  99. -1115 INVALID_TIF
  100. -1116 INVALID_ORDER_TYPE
  101. -1117 INVALID_SIDE
  102. -1118 EMPTY_NEW_CL_ORD_ID
  103. -1119 EMPTY_ORG_CL_ORD_ID
  104. -1120 BAD_INTERVAL
  105. -1121 BAD_SYMBOL
  106. -1125 INVALID_LISTEN_KEY
  107. -1127 MORE_THAN_XX_HOURS
  108. -1128 OPTIONAL_PARAMS_BAD_COMBO
  109. -1130 INVALID_PARAMETER
  110. -2008 BAD_API_ID
  111. -2010 NEW_ORDER_REJECTED
  112. -2011 CANCEL_REJECTED
  113. -2013 NO_SUCH_ORDER
  114. -2014 BAD_API_KEY_FMT
  115. -2015 REJECTED_MBX_KEY
  116. -2016 NO_TRADING_WINDOW
  117. -4000 INVALID_ORDER_STATUS
  118. -4001 PRICE_LESS_THAN_ZERO
  119. -4002 PRICE_GREATER_THAN_MAX_PRICE
  120. -4003 QTY_LESS_THAN_ZERO
  121. -4004 QTY_LESS_THAN_MIN_QTY
  122. -4005 QTY_GREATER_THAN_MAX_QTY
  123. -4006 STOP_PRICE_LESS_THAN_ZERO
  124. -4006 STOP_PRICE_GREATER_THAN_MAX_PRICE
  125. Messages for -1010 ERROR_MSG_RECEIVED, -2010 NEW_ORDER_REJECTED, and -2011 CANCEL_REJECTED

Не могу зайти на Binance

Такое случается не часто, но по различным причинам вы можете столкнуться с проблемами входа на биржу Binance. В большинстве случаев не стоит сильно переживать, потому что все решаемо.

В сегодняшней статье мы ответим на вопрос что делать если я не могу зайти на Binance, каким образом лучше всего решить эту проблему.

Не могу зайти на Binance

Основными причинами почему вы не можете получить доступ к своему аккаунту могут быть:

1. Самые частые причины проблем с входом

  • Проблемы в работе интерфейса биржи, различные технические ошибки, которые от вас не зависят — такие случаи уже были и остается только ждать пока разработчики все починят. Проверьте форумы и криптовалютные чаты, если это техническая проблема, то проблемы с входом будут не только у вас;
  • Вы вводите неверный пароль или логин, проверьте не используется ли Caps-Lock и убедитесь, что вы набираете именно то, что нужно;
  • Проблемы в браузере — проверьте включен ли JavaScript, а также очистите кэш браузера и Cookies, в некоторых случаях это может сработать;
  • Попробуйте альтернативную ссылку для входа: https://www.binance.com/hw_login.html. Эта страница находится на том же сайте. Если не хотите открывать ссылку, просто перейдите на страницу входа обычным способом и допишите перед login три символа: _hw;
  • Попробуйте использовать другое устройство, также попробуйте изменить DNS сервера для вашего компьютера на адреса Google, это 8.8.8.8 и 8.8.4.4;
  • Не приходит SMS на Binance — для некоторых стран все еще встречается такая проблема. Единственное правильное решение здесь будет — использовать двухфакторную аутентификацию от Google. Об этом есть отдельная статья;

2. Аккаунт заморожен Binance

Если вы получаете при входе сообщение «Your account has been frozen» или «Your account has been locked» это означает что ваш аккаунт был заморожен. Такое случается когда биржа обнаруживает подозрительную активность в вашем аккаунте и таим способом его защищает.

Обратите внимание, что замороженный аккаунт можно будет восстановить не ранее чем через два часа после блокировки. Чтобы разблокировать аккаунт нажмите кнопку «Reactivate»:

На ваш Email будет отправлено письмо с подтверждением восстановления:

Затем надо будет перейти по ссылки, что придет в письме:

После этого система попросит вас ввести адрес пополнения Binance на который вы в последний раз пополняли счет биржи, например, ваш адрес пополнения Ethereum.

Этот адрес вы можете найти на бирже или кошельке, с которого отправляли транзакцию. Если вам не удастся правильно ввести этот адрес биржа задаст еще несколько вопросов. Если же вы не сможете на них ответить можно будет попробовать еще раз через два часа или написать в техподдержку.

На последнем шаге биржа может попросить вас пройти верификацию аккаунта загрузив ваше фото и фото загранпаспорта.

3. Другие причины

В любом случае если вам не удалось решить проблему выше перечисленными способами осталось написать в техническую поддержку биржи. Обычно они быстро отвечают и помогают пользователям. Сделать это можно на этой странице. Хоть и часть интерфейса по русски, писать надо по английски чтобы вам смогли понять.

Выводы

В этой статье мы рассмотрели что делать если вы не можете войти в свой аккаунт Binance. Не забывайте включить двухфакторную аутентификацию чтобы обезопасить свой аккаунт.

Если вы нашли ошибку, пожалуйста, выделите фрагмент текста и нажмите Ctrl+Enter.

Источник

Обход 2FA на Binance и потеря 200000$

Когда речь заходит про безопасность обычный пользователь интуитивно доверяет самым популярным сервисам настолько, что мыслей о своей безопасности не возникает: даже если речь идёт про деньги и многие годы потраченного времени на их зарабатывание. Речь идёт о недавнем взломе известного в русском сегменте среди крипто-трейдеров блогере на самой популярной крипто бирже Binance. Первые реакция и мысли от жертвы можете увидеть здесь.

С применением социальной инженерии блогер был заражён вирусом REDLINE распакованный код которого можно скачать отсюда, а оригинальный файл которым осуществлялось заражение здесь. Подключение вирус вёл по данным IP: 80.85.139.166:40955 и 188.119.113.239:39889. Оба IP принадлежат хостинг-провайдеру и находятся в ДЦ Нидерланд.

16 августа ночью была осуществлена кража сессии авторизации на Binance из браузера с ноутбука жертвы и исходя из логов IP на бирже (отсутствуют сторонние IP) вероятней всего с помощью backconnect-proxy установленном на компьютер жертвы через loader первичного вируса успешный и незаметный вход на саму биржу.

Для многих кража логинов и паролей и даже активных сессий из браузера не кажется чем-то существенным благодаря присутствию на бирже 2FA-подтверждений через ввод SMS/E-Mail кодов. Ведь действительно: каждый раз для вывода средств или перевода их кому либо Вам потребуется данное подтверждение. Но, с недавних пор на бирже появился NFT-market где люди могут покупать и продавать цифровые товары (графика) и как выяснилось на многих хакерских форумах почти сразу начали появляться предложения о «выводе» денег с балансов через данную уязвимость. В Google просто введя фразу «обход 2FA Binance» можно встретить действительно огромный выбор исполнителей.

Сам взлом как и кража средств была проведена очень простым и ироничным способом: хакер разместил NFT по цене 193000$ и просто купил его с аккаунта жертвы у самого себя. Для этого на бирже нет абсолютно никаких ограничений, подтверждений и попросту механизмов защиты. Далее по словам BInance деньги были выведены с биржи, а сам аккаунт как они предполагают был «взломан». Сразу же возникает вопрос как хакер обходил на чужом аккаунте всё те-же двухфакторные авторизации. Может аккаунты оформлены на поддельные документы и биржа не желает признать что её «верификация» не более чем «пук в муку»?

По некоторым данным доход биржи за год составил 200 млрд $ и как я считаю они не имеют права на такие глупые ошибки в своей политике безопасности. Ведь решение просто лежит на поверхности:

Для NFT должен быть отдельный счет, перевод средств на который только через 2FA (и за отсутствие данного решения бирже и их специалистам по безопасности по моему мнению должно быть стыдно)

Если обнаруживается 2 одинаковые активные сессии — последняя должна сбрасываться, а на первой должно появится уведомление об этом.

PIN для авторизации с новых IP на WEB-интерфейсе. Даже для активной сессии.

Моё мнение: Binance обязаны компенсировать все украденные деньги по простой причине: это не вина пользователя. И они в таких случаях обязались возвращать средства. Да, пользователь подхватил вирус, но, пользователь был уверен что вывод без 2FA не возможен. Это именно дыра в их безопасности. Потому Binance обязаны извинится за долгое отсутствие реакции, а так-же немедленно исправить данную уязвимость пересмотрев те дыры услуги по которым предоставляют все кому не лень. Для биржи с такими доходами не должно быть проблемой просто взять и «воспользоваться» услугами этих хакеров, обнаружить проблемы и исправить. Это говорит о многом.

Доверяйте, но проверяйте. Но если Вы далеки от этих дел и Вам не понятна суть проблемы:

Представьте свой банковский кабинет. За перевод средств с Вас спрашивают код. Вы защищёны ровно до того момента как не появится в банке магазин nft-картинок который Вы даже не открывали и не знаете что оно такое и как работает. В мобильных приложениях данного раздела попросту даже и нет, потому открыть и воспользоваться им можно только через веб интерфейс.

Вы не знаете ни что там, ни зачем оно надо. Вы просто пропустили эту инновацию и не знаете как она функционирует. Вы знаете что у биржи на аккаунте есть разные счета: спотовый, фьючерсный и несколько остальных один из которых «p2p» средства с которого можно выслать напрямую другому пользователю только с подтверждением. Мало того, между этими счетами нужно специально переводить деньги с одного раздела на другой. И так, Вы не используя nft маркет просто не подозреваете о том, что кто угодно может сделать картинку ценой в весь Ваш баланс и без всяких подтверждений купить это заполучив Вашу сессию. Повторюсь: купить nft — это тоже самое что просто перевести другому пользователю деньги. И для этого бинанс не создал даже отдельный внутренний кошелек, средства на который по логике безопасности должны были бы переводится с обычных счетов через 2fa. Потому-что повторяюсь: nft маркет позволяет ставить любую цену и получать оплату в полном размере.

У Вас не спросили нужен ли Вам этот маркет, не попросили никакой подтверждающей активации данного раздела при первом посещении, не спросили подтверждения на перевод средств на этот маркет и не выявили подозрительным внезапную продажу всех активов на спотовом рынке за доллары и покупку картинки на впервые открытом разделе биржи. Это максимально наплевательское отношение и искусственно созданная дыра от плохой проработки аспекта безопасности нововведения. Разве пользователь обязан изучать биржу каждые 5 минут на предмет обновлений, быть специалистом по безопасности чтобы выявлять дыру в логике работы нововведений? Я считаю нет. Одно дело когда взламывают и сливают деньги со всей биржи. Другое, когда биржа без спроса пользователя создает возможность обойти двойную авторизацию на которую рассчитывает пользователь.

Поймать троян можно множеством способов: начиная от личной невнимательности, заканчивая тем, что сплоиты могут Вас заразить через браузер просто при пассивном посещении любого сайта. Вас могут протроянить склейкой с полезным файлом или используя уязвимости в системе и Вы попросту здесь не виноваты. Вы просто были подключены к интернету и не выполняли никаких действий. Ваши пароли могут украсть расширения из официального магазина браузера. Потому Вы рассчитываете на то, что главные действия с деньгами будут требовать подтверждения 2fa даже если Вас взломают. И биржа получает с Вас комиссионные за каждую сделку. Она работает не на «добром слове», а значит беря деньги, должна их защищать. Может я чего-то не понимаю о справедливости?

Источник

Change Log

2019-09-20

New returned values in response to GET /fapi/v1/account:
maxWithdrawAmount , openOrderInitialMargin , positionInitialMargin

New returned values in response to GET /fapi/v1/positionRisk:
liquidationPrice

General Info

General API Information

  • The base endpoint is: https://testnet.binancefuture.com
  • All endpoints return either a JSON object or array.
  • Data is returned in ascending order. Oldest first, newest last.
  • All time and timestamp related fields are in milliseconds.
  • HTTP 4XX return codes are used for for malformed requests; the issue is on the sender’s side.
  • 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.
  • Any endpoint can return an ERROR.

The error payload is as follows:

  • Specific error codes and messages defined in Error Codes.
  • 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 sent in both the query string and request body , the query string parameter will be used.

LIMITS

  • The /fapi/v1/exchangeInfo rateLimits array contains objects related to the exchange’s RAW_REQUEST , REQUEST_WEIGHT , and ORDER rate limits. These are further defined in the ENUM definitions section under Rate limiters (rateLimitType) .
  • A 429 will be returned when either rate limit is violated.
  • Each route has a weight which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier weight .
  • Every request will contain a X-MBX-USED-WEIGHT header which has the current used weight for the IP for the current minute.
  • When a 429 returned, it’s your obligation as an API to back off and not spam the API.
  • Repeatedly violating rate limits and/or failing to back off after receiving 429 will result in an automated IP ban (http status 418 ).
  • IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days.
  • A Retry-After header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 418 , to prevent a ban, or, in the case of a 429 , until the ban is over.

Endpoint Security Type

  • Each endpoint has a security type that determines the how you will interact with it.
  • API-keys are passed into the Rest API via the X-MBX-APIKEY header.
  • API-keys and secret-keys are case sensitive.
  • API-keys can be configured to only access certain types of secure endpoints. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes.
  • By default, API-keys can access all secure routes.
Security Type Description
NONE Endpoint can be accessed freely.
TRADE Endpoint requires sending a valid API-Key and signature.
USER_DATA Endpoint requires sending a valid API-Key and signature.
USER_STREAM Endpoint requires sending a valid API-Key.
MARKET_DATA Endpoint requires sending a valid API-Key.
  • TRADE and USER_DATA endpoints are SIGNED endpoints.

SIGNED (TRADE and USER_DATA) Endpoint Security

  • SIGNED endpoints require an additional parameter, signature , to be sent in the query string or 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.
  • Please make sure the signature is the end part of your query string or request body .
  • totalParams is defined as the query string concatenated with the request body .

Timing security

  • A SIGNED endpoint also requires a parameter, timestamp , to be sent which should be the millisecond timestamp of when the request was created and sent.
  • An additional parameter, recvWindow , may be sent to specify the number of milliseconds after timestamp the request is valid for. If recvWindow is not sent, it defaults to 5000.

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

HMAC SHA256 signature:

queryString:

symbol=BTCUSDT
&side=BUY
&type=LIMIT
&timeInForce=GTC
&quantity=1
&price=0.1
&recvWindow=5000
&timestamp=1499827319559

Example 2: As a request body

HMAC SHA256 signature:

requestBody:

symbol=BTCUSDT
&side=BUY
&type=LIMIT
&timeInForce=GTC
&quantity=1
&price=0.1
&recvWindow=5000
&timestamp=1499827319559

Example 3: Mixed query string and request body

HMAC SHA256 signature:

  • queryString: symbol=BTCUSDT&side=BUY&type=LIMIT&timeInForce=GTC
  • requestBody: quantity=1&price=0.1&recvWindow=5000&timestamp=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:

Order status (status):

Order types (orderTypes, type):

Order side (side):

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

Rate limiters (rateLimitType)

Rate limit intervals (interval)

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:

Name Type Mandatory Description
symbol STRING YES
limit INT NO Default 500; max 1000.
fromId LONG NO TradeId to fetch from. Default gets most recent trades.
  • 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:

Name Type Mandatory Description
symbol STRING YES
fromId LONG NO ID to get aggregate trades from INCLUSIVE.
startTime LONG NO Timestamp in ms to get aggregate trades from INCLUSIVE.
endTime LONG NO Timestamp in ms to get aggregate trades until INCLUSIVE.
limit INT NO Default 500; max 1000.
  • 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:

Name Type Mandatory Description
symbol STRING YES
interval ENUM YES
startTime LONG NO
endTime LONG NO
limit INT NO Default 500; max 1500.
  • 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:

Name Type Mandatory Description
symbol STRING NO
  • 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:

Name Type Mandatory Description
symbol STRING NO
  • 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:

Name Type Mandatory Description
symbol STRING NO
  • 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/
  • Combined streams are accessed at /stream?streams= / /
  • 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:
@aggTrade

Mark Price Stream

Mark price for a single symbol pushed every 3 secends.

Stream Name:
@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

Stream Name:
@kline_

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:
@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:
@ticker

Partial Book Depth Streams

Bids and asks, pushed every 250 milliseconds (if existing)

Stream Name:
@depth

How to manage a local order book correctly

  1. Open a stream to wss://testnet.binancefuture.com/stream?streams=btcusdt@depth.
  2. Buffer the events you receive from the stream. For same price, latest received update covers the previous one.
  3. Get a depth snapshot from https://testnet.binancefuture.com/fapi/v1/depth?symbol=BTCUSDT&limit=1000 .
  4. Drop any event where u is lastUpdateId in the snapshot
  5. The first processed event should have U lastUpdateId AND u >= lastUpdateId
  6. 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.
  7. The data in each event is the absolute quantity for a price level
  8. If the quantity is 0, remove the price level
  9. 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 :

Type Additional mandatory parameters
LIMIT timeInForce , quantity , price
MARKET quantity
STOP quantity , price , stopPrice
  • 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:

Name Type Mandatory Description
symbol STRING NO
recvWindow LONG NO
timestamp LONG YES
  • 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/
  • 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

Order Type

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

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.
  • 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

-1011 NON_WHITE_LIST

  • This IP cannot access this route.

-1013 ILLEGAL_MESSAGE

-1014 UNKNOWN_ORDER_COMPOSITION

-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

-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

-1109 BAD_ACCOUNT

-1110 BAD_INSTRUMENT_TYPE

-1111 BAD_PRECISION

  • Precision is over the maximum defined for this asset.

-1112 NO_DEPTH

-1113 WITHDRAW_NOT_NEGATIVE

  • Withdrawal amount must be negative.

-1114 TIF_NOT_REQUIRED

  • TimeInForce parameter sent when not required.

-1115 INVALID_TIF

-1116 INVALID_ORDER_TYPE

-1117 INVALID_SIDE

-1118 EMPTY_NEW_CL_ORD_ID

-1119 EMPTY_ORG_CL_ORD_ID

  • Original client order ID was empty.

-1120 BAD_INTERVAL

-1121 BAD_SYMBOL

-1125 INVALID_LISTEN_KEY

-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

-2010 NEW_ORDER_REJECTED

-2011 CANCEL_REJECTED

-2013 NO_SUCH_ORDER

-2014 BAD_API_KEY_FMT

-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

-4001 PRICE_LESS_THAN_ZERO

-4002 PRICE_GREATER_THAN_MAX_PRICE

-4003 QTY_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

-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:

Источник

Понравилась статья? Поделить с друзьями:
  • Bank interleave requested but not enabled как исправить
  • Bank 2 sensor 1 ошибка
  • Banished ошибка a fatal error
  • Bang dream как изменить язык
  • Bandicam ошибка инициализации устройства