Skip to content
NavenDocs
QuickstartAPI referenceOpen Naven
NavenDocs
Introduction
QuickstartHow x402 Payments WorkBuyer/Client GuideNaven CLISeller/Server Guide

Build with Naven

Payments

WalletQuickstartx402 PaymentsArcus Spot TradingERC-8004 identityAuthenticationAPI Reference

Resources

Naven Network
Wallet

Arcus Spot Trading

Quote, approve, execute, and track Arcus spot trades with a Naven wallet.

Arcus spot trading uses your existing Naven wallet credential. Supported networks are Robinhood mainnet (4663) and testnet (46630). This version supports the Arcus venue and verified non-meme tokens paired with USDG (mUSDG on testnet). Wrapped output is disabled. Quotes depend on available liquidity.

All routes below begin with /v1/wallets/me/spot and require:

Authorization: Bearer naven_wallet_...

Amounts are integer strings in atomic token units. Read the token's decimals before converting a human amount. API responses use the standard Naven { code, message, data } envelope. Keep the returned operation ID for recovery.

Discover tokens and balances

GET /v1/wallets/me/spot/tokens?chainId=4663

Returns an array of tokens with chainId, address, symbol, name, decimals, category, and verified. Use these addresses when preparing a trade.

POST /v1/wallets/me/spot/balances
Content-Type: application/json

{
  "chainId": 4663,
  "tokens": ["0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"]
}

Request between 1 and 20 supported token addresses. The response contains the wallet address, chainId, native ETH nativeBalance in wei, and tokens with their atomic balance and Permit2 allowance.

Prepare a trade

POST /v1/wallets/me/spot/quotes
Content-Type: application/json

{
  "chainId": 4663,
  "sellToken": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
  "buyToken": "0x322F0929c4625eD5bAd873c95208D54E1c003b2d",
  "sellAmount": "10000000",
  "slippageBps": 50
}

This example requests a quote for 10 USDG to TSLA. Verify the current token list before using it. slippageBps defaults to 50 (0.5%) and accepts integers from 0 through 500. A successful request returns 201 with a quoted operation; it does not sign or submit a trade.

An operation includes:

FieldMeaning
id, action, statusOperation identifier, swap or approval, and current state
chainId, venue, takerNetwork, arcus, and connected wallet address
sellToken, sellAmountToken metadata and exact atomic input amount
buyToken, buyAmount, minBuyAmountSwap output token, quoted output, and minimum received
slippageBps, allowWrappedSwap slippage limit and false
feesArray of fee amounts, token addresses, and types
approval, maxGasCostWeiApproval details and native gas cap, when applicable
expiresAtISO timestamp after which a fresh operation is required
txHash, errorCodeKnown transaction hash and failure reason, or null
createdAt, updatedAtISO timestamps

Review the wallet, network, token amounts, minimum output, fees, and expiry before allowing execution. Do not expose wallet credentials in prompts or client bundles.

Execute and track

POST /v1/wallets/me/spot/execute
Content-Type: application/json

{"operationId":"<operation UUID>"}

Execution uses the stored operation and its original limits. It cannot accept replacement tokens, amounts, signing data, or recipient addresses. Repeating execution for an already claimed ID returns its recorded state.

GET /v1/wallets/me/spot/operations/<operation UUID>

This reads the operation and checks its on-chain receipt when a hash is available.

StateMeaning and next step
quotedPrepared; review before executing
executingExecution was claimed; query this ID and do not submit a replacement
submittedAwaiting a verified chain result; continue checking
confirmedA successful trade fill or allowance was verified on-chain
failedInspect errorCode; the operation is not retried
unknownReconcile this ID; do not create a replacement trade

A successful HTTP response does not guarantee a fill. One unresolved operation blocks other spot executions for the same wallet and chain. If an uncertain operation has no transaction hash, contact the service operator for reconciliation. Never assume a timeout or expired quote proves that no transaction occurred.

Token approvals

When a token supports EIP-2612, execution can include a permit for the exact sell amount, expiring with the quote. Otherwise, an approval_required failure means an on-chain token approval is needed before requesting a fresh quote.

POST /v1/wallets/me/spot/approvals
Content-Type: application/json

{
  "chainId": 4663,
  "token": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
  "amount": "10000000",
  "maxGasCostWei": "100000000000000"
}

Choose the amount and gas cap for your own intended trade; the values above are examples. The returned operation contains approval.spender, currentAllowance, amount, and resetRequired. The spender is canonical Permit2. Review these fields and the gas cap before executing the approval's ID. An approval requires native ETH for gas.

If resetRequired is true, this operation sets allowance to zero. Confirm it, then prepare and confirm a second approval for the desired amount. After approval confirmation, request a fresh trade quote. Each approval expires after five minutes if it has not yet been executed.

Errors and limits

Invalid inputs return 400; missing or revoked credentials return 401. An operation outside the connected wallet returns 404. Expired quotes, a busy wallet, changed allowances, or exceeded gas caps return 409 before execution, or appear as a failed operation's errorCode after execution has been claimed. No available quote returns 422. Invalid provider quotes return 502; unavailable dependencies return 503. Failed operations can include approval_required, insufficient_balance, allowance_changed, or gas_limit_exceeded.

These limits apply per operation. They are not a daily budget or an unattended strategy policy. Your application must authorize financial execution. The Eve extension requires human approval for each trade and token approval.

x402 Payments

Call paid HTTP resources from a Naven EVM wallet.

ERC-8004 identity

Register an agent identity using your Naven account or your own signer.

On this page

Discover tokens and balancesPrepare a tradeExecute and trackToken approvalsErrors and limits