Index of every page on this site: llms.txt
All skills
binance avatar

/fiat

@7d1b1f7
by binancebinance/binance-skills-hub1.2k stars
281
Run it yourself

Query Binance fiat payment capabilities — supported countries, currencies, payment methods, limits, and crypto prices — via public APIs, plus authenticated order/payment history lookup. Use whenever users ask about buying or selling crypto with fiat, depositing or withdrawing fiat, fiat-crypto exchange rates, payment options in a specific country, or their fiat order history — even if they don't explicitly mention Binance APIs.

Use this Skill: https://skilld.dev/gh/binance/binance-skills-hub/fiat

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesauthentication.md

≈859 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Binance Authentication

All trading endpoints require either HMAC SHA256, RSA, or Ed25519 signed requests. Always detect the key type before signing, do not assume HMAC.

Base URLs

Environment URL
Mainnet https://api.binance.com

Required Headers

  • X-MBX-APIKEY: your_api_key
  • User-Agent: binance-fiat/1.1.0 (Skill)

Signing Process

Step 1: Build Query String

Include all parameters plus timestamp (current Unix time in milliseconds): transactionType=...&timestamp=1234567890123

Optional: Add recvWindow (default 5000ms) for timestamp tolerance.

Step 2: Percent‑Encode Parameters

Before generating the signature, percent‑encode all parameter names and values using UTF‑8 encoding according to RFC 3986. Unreserved characters that must not be encoded: A-Z a-z 0-9 - _ . ~

  • Chinese characters example: symbol=这是测试币456

Percent‑encoded: symbol=%E8%BF%99%E6%98%AF%E6%B5%8B%E8%AF%95%E5%B8%81456

Important: The exact encoded query string must be used for both signing and the HTTP request.

Step 3: Generate Signature

Generate the signature from the encoded query string.

HMAC SHA256 signature

Create HMAC SHA256 signature of the query string using your secret key:

# Example using openssl
echo -n "transactionType=...&timestamp=1234567890123" | \
  openssl dgst -sha256 -hmac "your_secret_key"
RSA signature

Create RSA signature of the query string using your private key:

# Example using openssl
echo -n "transactionType=...&timestamp=1234567890123" | \
  openssl dgst -sha256 -sign private_key.pem | base64
Ed25519 signature

Create Ed25519 signature of the query string using your private key:

# Example using openssl
echo -n "transactionType=...&timestamp=1234567890123" | \
  openssl pkeyutl -sign -inkey private_key.pem | base64

Step 4: Append Signature

Add signature parameter to the query string: transactionType=...&timestamp=1234567890123&signature=abc123...

Step 5: Add Product User Agent Header

Include User-Agent header with the following string: binance-fiat/1.1.0 (Skill)

Complete Example

Request:

curl -X GET "https://api.binance.com/sapi/v1/fiat/orders" \
  -H "X-MBX-APIKEY: your_api_key" \
  -H "User-Agent: binance-fiat/1.1.0 (Skill)" \
  -d "transactionType=...&timestamp=1234567890123&signature=..."
#!/bin/bash
API_KEY="your_api_key"
SECRET_KEY="your_secret_key"
BASE_URL="https://api.binance.com"  

# Get current timestamp
TIMESTAMP=$(date +%s000)

# Build query string (without signature)
QUERY="transactionType=...&timestamp=${TIMESTAMP}"

# Generate signature
# For HMAC SHA256:
SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -hmac "$SECRET_KEY" | cut -d' ' -f2)

# For RSA or Ed25519, replace the above line with the appropriate signing command.
##  RSA:
# SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -sign private_key.pem | base64)

##  Ed25519:
# SIGNATURE=$(echo -n "$QUERY" | openssl pkeyutl -sign -inkey private_key.pem | base64)

# Make request
curl -X GET "${BASE_URL}/sapi/v1/fiat/orders?${QUERY}&signature=${SIGNATURE}" \
  -H "X-MBX-APIKEY: ${API_KEY}"\
  -H "User-Agent: binance-fiat/1.1.0 (Skill)"

Security Notes

  • Never share your secret key
  • Use IP whitelist in Binance API settings
  • Enable only required permissions (spot trading, no withdrawals)

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

2 warnings2mo4 checks · Risk MEDIUM
  • Gen Agent Trust Hub2mo

    This skill provides instructions for querying Binance fiat payment services and performing authenticated operations like order history lookups. It requires the agent to automatically discover and read sensitive local files, such as .env, and to dynamically generate shell scripts for request signing. While it includes safety measures for masking secrets and confirming transactions, the automated access to sensitive local configuration files and dynamic command generation present security risks.

  • Socket2mo

    2 alerts: gptAnomaly

  • Snyk2mo

    Risk: LOW · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 7d1b1f7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 8 months ago
metadata
{
  "version": "1.1.0",
  "author": "Binance"
}

README badge

README badge for binance/binance-skills-hub/fiat