Skip to main content
Use this guide to add Robinhood tokenized stocks to your app with SODAX. Your users can buy a stock with a token they already hold, sell it back, and move it between Hedera, Stellar and Robinhood Chain. The guide covers how the tokens work, the order of the steps and the rules that matter. HTTP is the primary integration path; the TypeScript SDK and React hooks are an alternative. Signatures, types and full working code live in the references it links to, and those are what to copy from.

What it is

Robinhood Assets (Jersey) Limited issues tokenized stocks, ETFs and commodity funds on Robinhood’s own network, Robinhood Chain. Each one is an ordinary token named “Company name - Robinhood Token”, for example “Apple - Robinhood Token” (AAPL). SODAX makes the same stocks available on Hedera and Stellar, so your users can hold and trade them without leaving the network they already use. SODAX uses a hub-and-spoke design. Sonic is the hub, where the core contracts run. Every other network is a spoke that holds assets locally. For background, read Hub and spoke: how SODAX works. Three facts shape the integration:
  • Every stock token outside Robinhood Chain is backed 1:1 by the real Robinhood token. The real tokens are locked in the SODAX SpokeAssetManager contract on Robinhood Chain. The SpokeAssetManager is the SODAX contract on each spoke that holds deposits and pays out withdrawals.
  • Each ticker is one vault token on Sonic. A vault token is a single token on the hub that wraps the versions of the same asset from different networks. AAPL on Robinhood Chain, Hedera and Stellar all wrap into the one AAPL vault token, and that shared vault is what lets a stock move between the three networks. See Vault Token.
  • Stocks are swap assets. A stock quotes and executes like any other token, through the Swaps API. Moving the same stock from one network to another uses the Bridge API.
On Hedera, the supply of each stock token is created in advance and held by the SODAX SpokeAssetManager contract (0x0df73542cC68bDC01b361d231c60F726B0e0bC05, Hedera account 0.0.10495847). So the supply in users’ hands is the token’s total supply minus what that contract and the token’s treasury account hold. The same contract address holds the locked Robinhood tokens on Robinhood Chain. Hedera stock tokens use Hedera’s native token service (HTS) and have no KYC, freeze, wipe or pause keys. They do have an admin key and a supply key (see due diligence).

Live tickers and networks

Tickers are added over time, so read the list from the API rather than hard-coding it (Swap: HTTP API shows how over HTTP, and Swap: TypeScript (SDK) shows how in TypeScript). Every live ticker and its addresses are listed in Mainnet deployments: Robinhood Tokenized Equities. Read addresses from GET /v1/swaps/tokens or @sodax/sdk in code rather than copying them from a page. Each ticker is priced by its Robinhood Chain Chainlink feed where one exists, otherwise by Robinhood’s own price API. Some stocks and ETFs are also money-market reserves; Money Market on Robinhood Chain lists them. Users can supply them from Robinhood Chain, Stellar, Hedera or Sonic and borrow other assets against them; borrowing the stocks themselves is disabled. Every other stock is a swap asset only.

Choose a path

Prerequisites

For HTTP and SDK alike:
  • A SODAX API key from portal.sodax.com, kept on your server and sent as x-api-key on swap POST calls and on bridge calls. See API keys.
  • A wallet on the network your user starts from, with enough of the native token to pay network fees (HBAR on Hedera, XLM on Stellar, ETH on Robinhood Chain)
  • RPC access to the networks you use; a dedicated node provider is better in production
For the TypeScript SDK path, additionally:
  • The @sodax/sdk package installed, plus @sodax/wallet-sdk-core (or @sodax/wallet-sdk-react in a React app) for wallet providers. The SDK’s default RPC URLs are in spokeChainConfig
SODAX is mainnet-only, so test with small amounts. See Is SODAX on Testnet?.

Swap path: buy or sell a stock

HTTP API

The swap flow over HTTP uses the same endpoints as any other token. For the full endpoint reference see Swaps API.

Find the stock tokens

GET /v1/swaps/tokens returns the swap tokens grouped by chain key. Keep the robinhood, hedera and stellar groups, then the tokens with isRwa: true. That filter returns every real-world-asset token on those chains, not only Robinhood stocks; match the result against the Robinhood Tokenized Equities deployments list to keep just the stocks.
Use the address and chainKey values in the quote and intent calls below.
isRwa is served live but is not in the OpenAPI schema or the SwapTokenV2 type. Non-RWA tokens omit the field instead of sending false, so test == true. A typed client needs a raw read or a cast to see it.

Quote, approve, execute and track

The stock-specific flow is identical to any other token swap; stock tokens use no special endpoints. For the full step-by-step, with request bodies and response shapes, see Swaps API:
  1. Quote — POST /v1/swaps/quote with tokenSrc, tokenSrcChainKey, tokenDst, tokenDstChainKey, amount (in the source token’s smallest unit, as a decimal string) and quoteType: "exact_input".
  2. Apply slippage to quotedAmount on the client side. Never pass 0 as minOutputAmount.
  3. Check allowance — POST /v1/swaps/allowance/check. Steps 3, 4 and 5 all send the same body: srcChainKey, dstChainKey, inputToken, outputToken, inputAmount, minOutputAmount, deadline (decimal strings for the amounts and deadline), allowPartialFill, srcAddress and dstAddress; solver and data are optional. Map the quote fields onto it: tokenSrc → inputToken, tokenSrcChainKey → srcChainKey, tokenDst → outputToken, tokenDstChainKey → dstChainKey, amount → inputAmount. Get deadline from GET /v1/swaps/deadline first ("0" makes a limit order that never expires).
  4. Approve — POST /v1/swaps/approve with the same body if allowance is insufficient. Sign and broadcast the returned approval transaction and wait for its receipt. Continue only if the receipt shows success; a reverted approval leaves the allowance unchanged. With a Stellar source, steps 3 and 4 check and set up the trustline instead.
  5. Build the intent tx — POST /v1/swaps/intents with the same body. Keep the returned intent for steps 6 and 7. Sign and broadcast the returned tx on the source chain, wait for the receipt and require that it succeeded, not reverted, before you submit.
  6. Submit and track — only after the step 5 receipt succeeded, POST /v1/swaps/submit-tx with txHash, srcChainKey, walletAddress, the intent from step 5 and relayData, which is the hex string relayData.payload, not the object (all five are required), as in the Swaps bot flow. Treat success: true with data.status inserted or duplicate as accepted. submit-tx is idempotent on (txHash, srcChainKey), so after a lost response or a transient 5xx, resend the same body, and never broadcast a second source transaction. Back off on 429 (implement your own backoff), and surface a persistent 4xx error instead of retrying it. Then poll GET /v1/swaps/submit-tx/status?txHash=…&srcChainKey=…. Stop when status is solved, when it is failed, or when abandonedAt is set. On failed or abandonedAt, show userMessage, or a generic failure text if it is missing.
  7. Cancel an open intent — when the swap is failed or abandonedAt is set, show userMessage. If intentCancelled is not true and relayedForRefundAt is not set, POST /v1/swaps/intents/cancel with { srcChainKey, intent }, using the intent kept from step 5, then sign and broadcast the returned tx. If relayedForRefundAt is set, do not cancel: the refund is already relayed. See Swaps API.
Prepare the destination before you swap. A Stellar recipient needs a trustline for the token: use sodax.spoke.stellar.requestTrustline from @sodax/sdk, or any Stellar SDK’s ChangeTrust operation (see Stellar trustline). A Hedera recipient must associate the token (see Receiving tokens on Hedera). There is no HTTP endpoint for either.

Using TypeScript (SDK)

Set up Sodax and a wallet provider first, as in Configure the SDK and Wallet providers. Hedera and Robinhood Chain are EVM networks, so both use IEvmWalletProvider. Stellar uses IStellarWalletProvider. A stock swap is the same flow as Make a swap (SDK), which has the full detail. Find stocks by filtering a network’s supported tokens with isRealWorldAsset. Quote with sodax.swaps.getQuote, then apply your slippage to get minOutputAmount; never send 0n. Check and approve with sodax.swaps.isAllowanceValid and sodax.swaps.approve (on Stellar this sets up a trustline instead; see Stellar trustline). Execute with sodax.swaps.swap, and track with sodax.swaps.getDetailedStatus using the source transaction hash until the swap reaches a final status. The examples below use a Hedera wallet provider. In a browser, use the one your wallet connection gives you instead.

Find the stock tokens with the SDK

Filter a network’s swap tokens with isRealWorldAsset. How tokens are flagged, including token data that comes from an API, is in RWA classification.

Quote a buy

This example buys AAPL on Hedera with USDC on Hedera. Amounts are always in the token’s smallest unit, so scale by the token’s decimals.
To sell, swap the two tokens round: the stock is token_src and a stablecoin or native token is token_dst. The source and destination can be on different networks, for example USDC on Arbitrum into AAPL on Hedera.

Approve, execute and track with the SDK

Build CreateIntentParams from the quote, then approve, swap and track exactly as in Make a swap (SDK). The only stock-specific parts are the token addresses and the chain keys.

Bridge path: move a stock back to Robinhood Chain

Because every token is backed 1:1, a user holding a stock on any other network can bridge it back to Robinhood Chain, when the pair is supported and capacity allows, and receive the real Robinhood token, up to the limit POST /v1/bridge/bridgeable-amount or sodax.bridge.getBridgeableAmount returns at that moment. You can offer that in your own app.

HTTP API

The base URL is https://api.sodax.com, and the paths below include the /v1/bridge prefix. Send your x-api-key from your server on every bridge request; never from a browser — see API key good practices. Request and response bodies are typed in backendBridgeApiV2.ts, and @sodax/bridge-api is the TypeScript client. The bridge flow over HTTP:
  1. Confirm the pair — POST /v1/bridge/bridgeable/check with srcChainKey, dstChainKey, inputToken and outputToken. Continue only when bridgeable is true.
  2. Check capacity — POST /v1/bridge/bridgeable-amount with the same four fields. The response limit has amount (smallest unit, decimal string), decimals and type. Continue only when your amount is within it: amount × 10^limit.decimals ≤ limit.amount × 10^tokenDecimals, where amount is in the input token’s smallest unit and tokenDecimals is the input token’s decimals. Cross-multiplying avoids mixing scales, as in the TypeScript example below.
  3. Check allowance — POST /v1/bridge/allowance/check with srcChainKey, dstChainKey, inputToken, outputToken, inputAmount (smallest unit, decimal string), srcAddress and dstAddress. Steps 4 and 5 send the same seven fields.
  4. Approve — POST /v1/bridge/approve if needed. Sign and broadcast the returned approval transaction and wait for its receipt. Continue only if the receipt shows success. With a Stellar source, steps 3 and 4 check and set up the trustline instead.
  5. Build the bridge intent tx — POST /v1/bridge/intents. Sign and broadcast the returned tx on the source chain, wait for the receipt and require that it succeeded, not reverted, before you submit.
  6. Submit and track — only after the step 5 receipt succeeded, POST /v1/bridge/submit-tx with txHash, srcChainKey, walletAddress and the whole relayData object (address and payload) from step 5, unlike swaps (all four are required). Treat success: true with data.status inserted or duplicate as accepted. After a lost response or a transient 5xx, resend the same body rather than broadcasting a second source transaction; back off on 429, and surface a persistent 4xx error instead of retrying it. Then poll GET /v1/bridge/submit-tx/status?txHash=…&srcChainKey=… and read the outcome in this order: executed with result.dstIntentTxHash set is success. executed without it: keep polling for a bounded time, then your app reconciles using the source txHash and srcChainKey. failed, or abandonedAt set: failure, so show userMessage, or a generic failure text if it is missing.
Prepare a Stellar or Hedera destination first, as in the swap note: a trustline on Stellar, a token association on Hedera.

Using TypeScript (SDK)

Set up Sodax and a wallet provider as in Swap: TypeScript (SDK). sodax.bridge.bridge() moves the stock through its shared vault token on Sonic in one call. Confirm the pair with sodax.bridge.isBridgeable: two tokens are bridgeable when they share the same vault on Sonic. Check capacity with sodax.bridge.getBridgeableAmount; the limit carries its own decimals, so scale before you compare, as below. Check and approve with sodax.bridge.isAllowanceValid and sodax.bridge.approve, execute with sodax.bridge.bridge, and track with sodax.bridge.getDetailedStatus using the source transaction hash.
The same flow works in every direction between Robinhood Chain, Hedera and Stellar. When Stellar is the destination, set up the trustline first, as in Stellar trustline. Error codes and the timeout model are in Bridge (SDK).

dapp-kit hooks

Each SDK step has a matching @sodax/dapp-kit hook. Mutations expose mutateAsyncSafe, which returns a Result instead of throwing. For parameters and polling behaviour, read each hook’s source and the @sodax/dapp-kit reference.

Verify backing on-chain

There is no separately published proof of reserves, but anyone can check the backing on-chain. For each ticker, compare:
  • Supply in users’ hands on Hedera: the token’s total supply minus what the SODAX SpokeAssetManager on Hedera and the token’s treasury account still hold.
  • Locked on Robinhood Chain: what the same address holds of the real Robinhood token.
The script below runs the check for AAPL with @sodax/sdk, which supplies the addresses, the RPC clients and the ERC-20 ABI. Save it as verify-backing.ts and run it with npx tsx verify-backing.ts; change the ticker to check another stock.
You can also read the same balances in a block explorer: HashScan for Hedera and Robinhood Chain Blockscout for Robinhood Chain. The script subtracts only what the SpokeAssetManager holds, so it assumes the token’s treasury account holds none. Read the treasury account from the Hedera mirror node (/api/v1/tokens/<token id>) and its balance from /api/v1/tokens/<token id>/balances?account.id=<treasury>, and subtract that too if it is not zero.
This script checks Hedera only. The same locked tokens also back that ticker on Stellar (7 decimals) and Sonic, so full backing means the locked balance covers the supply in users’ hands on all three combined. A true here does not prove that on its own.

Gotchas

  1. Route through a stablecoin or native token. Each stock trades only against USDG on Robinhood Chain, so every route passes through USDG. The best-supported swaps are a stablecoin or native token into a stock (for example USDC, USDT, ETH or S), and a stock back out to USDC or S.
  2. Stock-to-stock swaps may fail. They route stock → USDG → stock and only quote above a small minimum size. A stock on one spoke into another stock on a spoke (for example Hedera AAPL into Hedera NVDA) can need more hops than the router allows and return “no path”. Sell into a stablecoin first, then buy.
  3. Mind the decimals. The same stock has 18 decimals on Robinhood Chain, 8 on Hedera and 7 on Stellar. Input amounts are in the source token’s smallest unit, minOutputAmount is in the destination token’s smallest unit, and a bridge limit is in its own limit.decimals, so read decimals from each token object.
  4. Tickers are added over time. Over HTTP, GET /v1/swaps/tokens and GET /v1/bridge/tokens return the current live set. With the SDK, sodax.swaps.getSupportedSwapTokensByChainId(chainKey).filter(isRealWorldAsset) and sodax.bridge.getBridgeableTokens return the tokens bundled with your @sodax/sdk version, and sodax.swaps and sodax.bridge accept only those. A stock listed after your release needs an SDK update, or the backend API path: list tokens with sodax.api.swaps.getTokens() or sodax.api.bridge.getTokens() and run the flow through sodax.api.swaps or sodax.api.bridge (see Where supported tokens come from). isRealWorldAsset also knows only the bundled tokens, so classify a newer one by isRwa in the raw GET /v1/swaps/tokens response (the field is outside the typed schema; see the note above). Appearing in the vault registry is not proof that a feature is live.
  5. Check the bridge limit before you bridge. POST /v1/bridge/bridgeable-amount (HTTP) or sodax.bridge.getBridgeableAmount (SDK) returns the most that can move right now. Disable the action, or cap the amount, when the user asks for more.
  6. Stellar needs a trustline to receive. When Stellar is the destination, check and create the trustline before you swap or bridge. When Stellar is the source, isAllowanceValid and approve handle it in the SDK. Over HTTP, use POST /v1/swaps/allowance/check and POST /v1/swaps/approve for swaps, and POST /v1/bridge/allowance/check and POST /v1/bridge/approve for bridges. No HTTP endpoint adds a trustline for a destination. For a new Stellar account, POST /v1/sponsorships/stellar/accounts activates it; it needs the sponsoring x-api-key and a base64 activation transaction signed by the new account (see Stellar sponsoring). The trustline is still a separate transaction.
  7. Hedera token association. Neither the API nor the SDK associates tokens for you on Hedera destinations, so check the recipient and have the user associate first. See Receiving tokens on Hedera.
  8. Branch on result.ok, and discriminate on error.code. SDK operations return a Result and never throw, and error messages are not stable. Over HTTP, treat failed status as real: act on userMessage and cancel an open swap intent as in swap step 7, and only log failureReason and failedAtStep.
  9. Keep API keys on the server. A key in a browser bundle is public. See API key good practices.

Build it with an AI agent

Install the @sodax/skills bundle before you start the agent, and connect the SODAX MCP so it can read live tokens and quotes. Then describe the task plainly, for example “Add a stocks tab that lets a Hedera user buy AAPL with USDC using @sodax/dapp-kit”. Check what the agent produces against the Gotchas.

FAQ

Backing on each network, how the supply works, the path back to Robinhood Chain, fees and limits are answered in the Robinhood stocks FAQ.

Swaps API

Full HTTP reference for quotes, intents, submit-tx and status polling.

Bridge API

HTTP client package for the bridge: endpoints, errors and the submit-tx flow.

Make a swap (SDK)

Every step of an SDK swap, with allowance, status and error handling.

Bridge (SDK)

Every sodax.bridge method, error code and type.

Vault Token

How one token on Sonic wraps the same asset from many networks.

Mainnet deployments

Every stock token, hub asset and vault address.