मुख्य सामग्री पर जाएं
POST
/
send
Send native assets and tokens
curl --request POST \
  --url https://api.afkcrypto.com/v1/send \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "chain": "<string>",
  "to": "<string>",
  "asset": "native",
  "amount": "<string>",
  "from": "<string>",
  "token": "<string>"
}
'
{ "id": "tx_...", "status": "SUBMITTED", "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x...", "chainName": "Base" }
Idempotency-Key हेडर आवश्यक है। ERC20 transfer() कॉल करता है; SPL आवश्यकतानुसार ATA बना सकता है।
{ "id": "tx_...", "status": "SUBMITTED", "hash": "0x...", "explorerUrl": "https://basescan.org/tx/0x...", "chainName": "Base" }

प्राधिकरण

x-api-key
string
header
आवश्यक

हेडर

Idempotency-Key
string<uuid>
आवश्यक

Provide a unique Idempotency-Key per user to ensure single submission.

बॉडी

application/json
chain
string
आवश्यक

Chain slug (e.g., base, base-sepolia, solana-devnet).

to
string
आवश्यक

Recipient wallet address (owner for token transfers).

asset
enum<string>
आवश्यक

Asset type to send.

उपलब्ध विकल्प:
native,
erc20,
spl
amount
string
आवश्यक

Amount in base units (wei/lamports/token units).

from
string | null

Optional sender wallet; defaults to user's default wallet for the chain.

token
string | null

Token address (EVM) or mint (Solana) when sending tokens.

प्रतिक्रिया

Submission accepted

id
string
आवश्यक

AFK transaction id for the submitted action.

status
enum<string>
आवश्यक

Submission status.

उपलब्ध विकल्प:
SUBMITTED
hash
string | null
आवश्यक

On-chain transaction hash/signature (may be null at submission time).

explorerUrl
string | null
आवश्यक

Direct link to the transaction on a chain explorer. Null until a hash/signature exists.

chainName
string
आवश्यक

Human-readable chain name for display (e.g., Base, Ethereum, Solana).