Account Operations
Execute advanced account operations including contract calls, upgrades, and asset withdrawals.
Owner Contract Call
Execute a contract call as the account owner.
POST /v1/accounts/call
Headers
Request Body
curl -X POST \
"https://api.o2.app/v1/accounts/call" \
-H "Accept: application/json" \
-H "O2-Owner-Id: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"Rate Limit: 10 requests/minute (Owner ID-based)
Source: packages/api/src/app/routes/v1/accounts.rs:owner_call_contract_handler
Owner Multiple Contract Calls
Execute multiple contract calls in batch as account owner.
POST /v1/accounts/calls
Headers
Request Body
curl -X POST \
"https://api.o2.app/v1/accounts/calls" \
-H "Accept: application/json" \
-H "O2-Owner-Id: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"Rate Limit: 10 requests/minute (Owner ID-based)
Source: packages/api/src/app/routes/v1/accounts.rs:owner_call_contracts_handler
Upgrade Account
Upgrade trading account contract to newer version.
POST /v1/accounts/upgrade
Headers
Request Body
curl -X POST \
"https://api.o2.app/v1/accounts/upgrade" \
-H "Accept: application/json" \
-H "O2-Owner-Id: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"Rate Limit: 10 requests/minute (Owner ID-based)
Source: packages/api/src/app/routes/v1/accounts.rs:upgrade_account_handler
Withdraw Assets
Withdraw assets from trading account.
POST /v1/accounts/withdraw
Headers
Request Body
curl -X POST \
"https://api.o2.app/v1/accounts/withdraw" \
-H "Accept: application/json" \
-H "O2-Owner-Id: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
-H "Content-Type: application/json"Rate Limit: 10 requests/minute (Owner ID-based)
Source: packages/api/src/app/routes/v1/accounts.rs:withdraw_handler