Binance Payouts / DONE

Binance Payout Module Setup Instructions

Setting API keys in admin panel

  1. Log in to your Binance account -> go to the Manage API page.

  2. Click ‘Create API’ -> select API key type, for example, ‘System Generated’ -> click ‘Next’ -> create a label for the API key -> click ‘Next’ -> pass the security check.

  3. After generating the keys, copy the API Key and Secret key values to a safe place.

  4. In the BoxExchanger admin panel, go to the Binance payout module settings page. To do this, go to the ‘Merchant and API’ page - ‘PAYOUT SYSTEM’ section - settings (settings icon) in the block with the ‘Binance’ module.

  5. In the ‘Withdraw from’ field enter a suitable currency. For more details, see #dopolnitelnye-nastroiki-modulya.

  6. In the ‘API Key’ field, paste the API key copied in step 3 and press ‘Save’.

  7. In the ‘API Secret’ field, paste the Secret key copied in step 3 - click ‘Save’. (after reloading the page, API Secret will be hidden and will not be displayed in the admin panel for security reasons).

  8. On the Binance module settings page in the ‘IP SERVER’ section, copy the IP -> go back to the ‘API Management’ page in Binance LK -> in the block with the created API key, click ‘Edit Restrictions’ -> select ‘Allow access only to trusted IP addresses’ -> paste the IP you copied earlier -> ‘Confirm’.

  9. Under ‘API Restrictions’ select the allowed actions below -> click ‘Save’ -> pass the security check.

Permitted actions
  • Allow universal transactions

  • Enable spot and margin trading

  • Enable withdrawal of funds

  1. Binance's payout module is set up.

Algorithm of module operation (Withdraw from USDT)

Formula for calculating the order amount: Amount to be received by the client on theorder+ amount for withdrawal of this currency + 0.2% (0.1% trading commission and 0.1% margin of error) of the sum of the two previous summands - Amount of currency on the spot balance. Example:

Exchange 5 USDT -> 50 TRX

Payout module for TRX: Binance

TRX withdrawal fee from Binance: 1 TRX

TRX amount on spot balance: 0 TRX

Order amount calculation: (50 TRX + 1 TRX) + (50 TRX + 1 TRX)*0.02 - 0 TRX = 51 TRX + 1.02 TRX = 52.02 TRX (the order will be placed for 52.1 due to Binance rounding).

  1. Starting the Binance payout module, by putting the request into the ‘For payout’ status (confirming the payout with ‘Allow auto payout’ if ‘Auto exchange’ is turned off for the referral).

  2. Checking the balance on the spot account for the currency to be received by the client.

  3. In case of:

  • There is enough currency on the balance -> the script creates a request to withdraw currency (excluding withdrawal fee) to the client's wallet address.

  • There is not enough currency on the balance -> the script places an order in the Currency/USDT market pair (but not less than the minimum order amount) to buy the missing amount (the formula for calculating the order amount is above) for the currency for withdrawal -> request for currency withdrawal (without taking into account the withdrawal fee) to the client's wallet address.

Пример #1 Недостаточная сумма валюты для вывода на спотовом балансе Binance
  • Обмен 50 USDT -> 500 TRX

  • Модуль выплаты для TRX: Binance

  • Комиссия за вывод TRX с Binance: 1 TRX

  • Сумма TRX на спотовом балансе: 400 TRX

  1. Скрипт высчитывает недостающую сумму TRX для вывода: (500 TRX + 1 TRX) - 400 TRX = 101 TRX

  2. Скрипт выставляет в паре TRX/USDT market ордер на покупку 101 TRX + 0.2% = ~101.2 TRX

  3. Скрипт создает заявку на вывод 500 TRX, а 1 TRX уходит на комиссии.

  1. Смена статуса заявки на "Завершена" и добавления комментария к заявке с хешем вывода.

Особенности работы модуля

  • Средства на Funding балансе не учитываются скриптом.

  • Если недостающая сумма для вывода будет меньше минимальной суммы ордера в данной паре (Обычно ≥ эквивалент 5 USDT), то скрипт будет выставлять минимальный market ордер на покупку (эквивалент 5 USDT + 0.2%).

Пример #2 Недостающая сумма для вывода меньше минимальной суммы ордера
  • Обмен 50 USDT -> 500 TRX

  • Модуль выплаты для TRX: Binance

  • Комиссия за вывод TRX с Binance: 1 TRX

  • Сумма TRX на спотовом балансе: 490 TRX

  • Минимальная сумма ордера в паре TRX/USDT: ≥ эквивалент 5 USDT

  1. Скрипт высчитывает недостающую сумму TRX для вывода: (500 TRX + 1 TRX) - 490 TRX = 11 TRX

  2. Так как 11 TRX < минимальной суммы ордера в паре -> в паре TRX/USDT выставляется market ордер на покупку на сумму TRX, эквивалентную 5 USDT, к примеру, 50 TRX (сумма может меняться в зависимости от актуального рыночного BID курса в паре TRX/USDT) + 0.2% = ~ 50,1 TRX

  3. Скрипт создает заявку на вывод 500 TRX, а 1 TRX уходит на комиссии.

  • Сумма ордера округляется в зависимости от пары. К примеру, если недостающая сумма для вывода TRX составляет 45.8623214939582570487 TRX, то ордер будет выставлен на 45.9 TRX.

  • Комиссия за вывод средств на адрес пользователя Binance возвращается на баланс.

Additional module settings

  • - depending on the selected parameter the process of obtaining currency for withdrawal to the client on request will depend on it. To configure it, enter one of the proposed currencies in capital letters -> press ‘Save’..

**DIRECT** - direct currency withdrawal without exchange. For example, if you need to withdraw BTC, you must have a BTC reserve on your Binance balance. For ETH - ETH reserve on the balance.

**BTC/ETH/USDT** - use the specified currency to receive the currency the client should receive on the request. For example, the client needs to get DOGE, for the field ‘**Withdraw from**’ ‘**USDT**’ is selected - in this case you should have USDT reserve on your balance, for which the required amount of DOGE will be bought in DOGE/USDT pair. \
Usually ‘**USDT**’ is selected.

* [**API URL**](#user-content-fn-13)[^13] **-** link to the actual Binance API URL. The value is specified by default.

Last updated