SkillAgentSearch skills...

Binance

Binance API Client Futures Spot

Install / Use

npx skills add juancarlospaco/binance

Installs into whichever agent you are using.

README

Binance

Requisites

  • Valid API Key and API Secret, with all permissions, get it for free at https://www.binance.com/en/my/settings/api-management

  • Device Date and Time must be configured, up to the seconds precision, Binance is strict about timestamps, use https://github.com/juancarlospaco/binance/blob/nim/examples/binanceVslocalTime.nim to debug time diff. In Windows, if you get 400 Bad Request, check the time, Windows like to change the time without warning after updates, set the correct time, up to the seconds precision, and disable Windows auto-update of time from the Windows settings.

  • Some USDT in Binance Spot wallet to trade with, >10 USDT minimal, >100 USDT recommended.

  • Some BNB coins in Binance Spot wallet for commisions, >1 USD in BNB minimal, >10 USD in BNB recommended.

  • Some USDT in Binance Futures USD-M wallet to trade with, >100 USDT minimal, >1000 USDT recommended.

  • Some BNB coins in Binance Spot wallet for commisions, >1 USD in BNB minimal, >10 USD in BNB recommended.

  • If you are reading this after year 2023, the web of Binance for the API Keys has changed, but it still works.

Examples

import std/httpcore, binance
let client = newBinance("YOUR_BINANCE_API_KEY", "YOUR_BINANCE_API_SECRET")
let preparedEndpoint = client.orderTest(SIDE_BUY, ORDER_TYPE_LIMIT, ORDER_RESP_TYPE_FULL, $TIME_IN_FORCE_GTC, "1", "BTCUSDT", 0.1, 10_000.00)
echo client.request(preparedEndpoint, HttpPost)

Documentation

  • https://juancarlospaco.github.io/binance
  • By default is using the real production Binance API.
  • Spot API (including OCO Orders) and Futures API (including 125x Leveraged Perpetual Futures) are supported.
  • Automatic Trailing Stop-Loss is supported.
  • Automatic Cancelation of Futures is supported.

TradingBot

  • How to create a TradingBot ?.

TradingBot example: https://github.com/juancarlospaco/binance/blob/nim/examples/newcoin.nim

Gift-Card Bot example: https://github.com/juancarlospaco/binance/blob/nim/examples/giftcardbot.nim

Leveraged Perpetual Futures with Stop-Loss and Trailing Stop-Loss example: https://github.com/juancarlospaco/binance/blob/nim/examples/futures_maker.nim

More

  • See also https://github.com/juancarlospaco/tradingview#tradingview
  • See also https://github.com/juancarlospaco/cloudbet#cloudbet

💰➡️🍕

<details> <summary title="Send Bitcoin"><kbd> Bitcoin BTC </kbd></summary>

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

BTC Bitcoin Network

1Pnf45MgGgY32X4KDNJbutnpx96E4FxqVi

Lightning Network

juancarlospaco@bitrefill.me
</details> <details> <summary title="Send Ethereum and DAI"><kbd> Ethereum ETH </kbd> <kbd> Dai DAI </kbd> <kbd> Uniswap UNI </kbd> <kbd> Axie Infinity AXS </kbd> <kbd> Smooth Love Potion SLP </kbd> <kbd> Uniswap UNI </kbd> <kbd> USDC </kbd> </summary>

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e
</details> <details> <summary title="Send Tether"><kbd> Tether USDT </kbd></summary>

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e

TRC20 Tron Network

TWGft53WgWvH2mnqR8ZUXq1GD8M4gZ4Yfu
</details> <details> <summary title="Send Solana"><kbd> Solana SOL </kbd></summary>

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

SOL Solana Network

FKaPSd8kTUpH7Q76d77toy1jjPGpZSxR4xbhQHyCMSGq
</details> <details> <summary title="Send Cardano"><kbd> Cardano ADA </kbd></summary>

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e

ADA Cardano Network

DdzFFzCqrht9Y1r4Yx7ouqG9yJNWeXFt69xavLdaeXdu4cQi2yXgNWagzh52o9k9YRh3ussHnBnDrg7v7W2hSXWXfBhbo2ooUKRFMieM
</details> <details> <summary title="Send Sandbox"><kbd> Sandbox SAND </kbd> <kbd> Decentraland MANA </kbd></summary>

ERC20 Ethereum Network

0xb78c4cf63274bb22f83481986157d234105ac17e
</details> <details> <summary title="Send Algorand"><kbd> Algorand ALGO </kbd></summary>

ALGO Algorand Network

WM54DHVZQIQDVTHMPOH6FEZ4U2AU3OBPGAFTHSCYWMFE7ETKCUUOYAW24Q
</details> <details> <summary title="Send Polkadot"><kbd> Polkadot DOT </kbd></summary>

DOT Network

13GdxHQbQA1K6i7Ctf781nQkhQhoVhGgUnrjn9EvcJnYWCEd

BEP20 Binance Smart Chain Network BSC

0xb78c4cf63274bb22f83481986157d234105ac17e
</details> <details> <summary title="Send via Binance Pay"> Binance </summary>

https://pay.binance.com/en/checkout/e92e536210fd4f62b426ea7ee65b49c3

</details>

Stars

:star: @juancarlospaco :star: @kennym :star: @nickolaz :star: @Nacho512 :star: @hannylicious :star: @Walter-Santillan :star: @kamilchm :star: @Parzivalcen :star: @hugosenari :star: @RodrigoTorresWeb :star: @villawolfpy :star: @frankmoshe :star: @lf-araujo :star: @badsector666 :star: @Hamzadutsher :star: @Kensingtonn :star: @ccamateur :star: @hienpro00123 :star: @moigagoo :star: @vegardsjo :star: @serjepatoff :star: @teroz :star: @AndrewGPU :star: @touhid12310 :star: @JPANA108 :star: @tejusb9 :star: @Osamaalsabahy :star: @Osamaalsabahy :star: @Osamaalsabahy :star: @Osamaalsabahy :star: @deliriant :star: @Nomemartin :star: @FENIXG99 :star: @tuanductran

Related Skills

View on GitHub
GitHub Stars30
CategoryFinance
Updated9mo ago
Forks9

Languages

Nim

Security Score

87/100

Audited on Nov 3, 2025

No findings