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
| Field | Type | Required | Description |
|---|---|---|---|
wallets | string[] | yes | 1–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.
Response 200
{
"wallets": ["Pubkey1…", "Pubkey2…"]
}
Errors
| Status | Meaning |
|---|---|
400 | Validation error or duplicate / invalid key. |
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…"] }'