Skip to main content

POST /wallets/import

Import existing keypairs as user wallets.

Accepts base58 or JSON-array key formats. All-or-nothing: one bad entry rejects the whole batch.

Use case​

Onboarding a user who already has funded wallets — bulk-register up to 100 keys so they can be referenced as trading / sniper wallets later.

Body​

FieldTypeRequiredDescription
walletsstring[]yes1–100 entries. Each is a base58 secret string or a stringified [n1,…,n64] JSON array.

Behavior​

All-or-nothing: any invalid key, in-batch duplicate, or already-owned address rejects the whole call.

Imported wallets are reserved for Smart Sell: they cannot sign transfers, /holders/pay, /trading/swap or token operations (403).

Response 200​

{
"wallets": ["Pubkey1…", "Pubkey2…"]
}

Errors​

StatusMeaning
400Validation error, duplicate / invalid key, wallet already owned (response includes addresses), batch above the per-request cap, or per-user wallet cap exceeded.

Example​

curl -X POST "$BASE_URL/wallets/import" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID" \
-H "Content-Type: application/json" \
-d '{ "wallets": ["5XK…"] }'