Most asked questions:


Q: What do I have to do before I start trading on a DEX?

A: You need a Solana wallet (Phantom or Solflare are good options) and enough SOL for transaction fees. Try to keep your balance above 0.1 SOL at all times.

Q: What is an open orders account? Why should I include my open orders account in the request?

A: In order to interact with the Serum DEX, users must create an intermediary open orders account. This accounts stores funds used for placing or filling orders and tracks all of a given user's open orders. Technically, you can have multiple open order accounts for any target market. Our API looks up your open orders accounts (identified by your Solana address) and uses the first returned account by default. You should specify your account to skip this extra step, which can be time-consuming.

Q: What are the benefits of sending transactions through bloXroute Solana Trader API?

A: How is our Solana API faster than any other Solana RPC node out there? All transactions submitted through our Solana Trader API utilize the following technologies to get the best performance. bloXroute Solana BDN bloXroute Solana BDN is a network of servers optimized for sending data fast on blockchains. It offers reduced latency shred propagation, working alongside the existing Turbine protocol. In early stage testing, we observed the following mertrics:

  • Listen faster / React faster - 30/50ms advantage

  • Transaction routes to leader via BDN - 5-30ms speed advantage

Learn more about Solana BDN here. Marinade integration All Solana Trader API transactions are routed through Marinade mTransaction. mTransaction provides the service of sending the Solana transaction on behalf of the staked nodes and gets stake weighted QoS priority (Validators running an mTransaction client have 11M SOL in total.).

Q: My funds disappeared after the order was filled or canceled. Where is my money?

A: Your funds are safe. All trades done on the orderbook-based DEX uses an intermediary account (the open orders account, as mentioned above) for each pair. Filled or canceled funds must to be settled back into your wallet. You can use GET Unsettled to check your balance and POST Settle to move funds to your wallet.

Q: I'm always getting {"code":5, "message":"Not Found", "details":[]} from HTTP endpoints. Why doesn't this work?

A: Make sure you're not including an / in your market name. For example, SOL/USDC must be specified as SOLUSDC, SOL:USDC or SOL-USDC in HTTP endpoints.

Q: Why does my transaction always fail in a simulation?

A: Before we submit a transaction to the network, we simulate the transaction execution and don't send it if execution fails to save you the transaction fee. Sometimes this behavior is not desirable. For example, if you are writing a high frequency application, the Solana transaction simulation might lag too far behind for your purposes. You might also want to see the failed transaction in an explorer like SolScan to get a visual sense of what's happening. In those cases you can set the skipPreflight flag to be false to skip the simulation and send the transaction directly.

Debugging actual execution failures can be fairly complicated. We have work planned to try and make these error messages more helpful but you'll have to take some manual steps in the meantime. Error messages are specific to the relevant instruction's program, so you'll most likely want to set the skipPreflight flag to see the transaction in SolScan and the exact instruction/program that failed, after which you should search for the error definition file for the failed program or the line of code in the program that failed.

Here are some useful links:

Some examples:

"Transaction simulation failed: Error processing Instruction 0: custom program error: 0x1"

This typically indicates insufficient funds (see first link). SolScan example

"Transaction simulation failed: Error processing Instruction 0: custom program error: 0x29"

When canceling orders this indicates that the client ID is not found (see second link). SolScan example

"Transaction simulation failed: Error processing Instruction 1: custom program error: 0x10005d3"

This one's more complicated –– this longer error code indicates that a lookup is required from the program. You'll want to take off the leading part to get 0x5d3, which translates to line 1491 in the program code (see third link).

    declare_validated_account_wrapper!(TokenAccount, |account: &AccountInfo| {
        check_assert_eq!(*account.owner, spl_token::ID)?;  // <- this line
        let data = account.try_borrow_data()?;
        check_assert_eq!(data.len(), spl_token::state::Account::LEN)?;

        let is_initialized = data[0x6c];
        check_assert_eq!(is_initialized, 1u8)?;

This indicates that the account owner was specified incorrectly. SolScan example

Last updated