Skip to main content
POST
Register agent wallet
Agent wallet management uses the unified POST /order endpoint. Send a transaction with an agentWalletCreation action in the actions array.
If signer != account, the signer must be pre-authorized. Agent wallets allow the agent to trade on behalf of the account; register the agent with this action before the agent submits orders.
Scope: agent wallets are registered on the account field of this transaction. An agent registered on a master can sign for that master and for any of its sub-accounts. Sub-accounts can also register their own agent wallets independently (set account to the sub-account pubkey when registering). To use an agent on a sub-account, set the transaction account to the sub-account pubkey and signer to the agent wallet’s pubkey.Isolated accounts are managed entirely through the i flag on order actions and are never set as account for any transaction (including agentWalletCreation). See Isolated Margin.

Transaction Envelope

Every request to POST /order has this shape:
For agent wallet, the action is a single agentWalletCreation object.

Agent Wallet Action


Request Examples

Register an agent

Remove an agent


Signing the Transaction

The canonical signing path is the raw wincode binary message described in Transaction Signing. Two extra signing modes are accepted on this endpoint:
  • General offchain mode: any transaction (including agentWalletCreation) can be signed using the v0 Solana offchain-message envelope. Set x-bulk-sig-mode: offchain on the request. See Offchain Signing Mode.
  • Legacy wallet-compatibility path (owner-signed agentWalletCreation only): when signer == account and the transaction contains exactly one agentWalletCreation action, the server also accepts a signature over bs58_encode(canonical_binary_message).as_bytes() for older wallet UIs that cannot produce raw binary signatures. See Legacy Wallet-Compatibility Path.

Response

Same OrderResponse format as other actions. Success may return agentWallet status:
Failure returns agentWalletFailed:

Before You Start

See the Transaction Signing guide for how to sign your requests.Nonce: Use a unique value (e.g. timestamp in nanoseconds): BigInt(Date.now()) * 1_000_000n

Body

application/json

Transaction with a single agentWalletCreation action

actions
Agent wallet (agentWalletCreation) · object[]
required

Must contain exactly one agentWalletCreation action

nonce
integer<int64>
required

Unique nonce (e.g. nanoseconds)

account
string
required

Account public key (base58)

signer
string
required

Signer public key (base58)

signature
string
required

Ed25519 signature (base58)

Response

200 - application/json

Agent wallet registered or removed

status
enum<string>
Available options:
ok,
error
response
object