Solana Trading

On-chain execution and portfolio management

OCSE Trader integrates directly with the Solana blockchain to execute trades with high speed and low cost.

xStocks

We trade xStocks, which are tokenized versions of traditional equities (like TSLA, NVDA, AAPL) available on the Solana blockchain.

| Stock | Symbol | Contract Address | | :--- | :--- | :--- | | Tesla | TSLAx | XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB | | NVIDIA | NVDAx | Xsc9qvGR1efVDFGLrVsmkzv3qi45LTBjeUKSPmx9qEh | | Apple | AAPLx | XsbEhLAtcf6HdfpFZ5xEMdqW8nfAvcsP5bdudRLJzJp |

Execution Engine

The agent uses the SolanaTracker Swap API to fetch the best routes for trading SOL against xStocks.

Buy Logic

  1. Calculate available SOL balance.
  2. Max allocation is set to 90% of available SOL (with a buffer for gas).
  3. Final amount = Max Allocation * (Conviction / 100).

Sell Logic

  1. Check current holdings for the specific token.
  2. Final amount = Total Holding * (Conviction / 100).

Transaction Lifecycle

Transactions are signed locally using the SOLANA_PRIVATE_KEY provided in the environment variables and broadcasted to the Solana mainnet.

// Simplified Execution Flow
const txid = await sendTransaction(wallet, swapRes.txn);
console.log(`[Agent] Trade successful: ${txid}`);

Security

  • Private keys are never stored on-chain or in logs.
  • All transactions are executed through a non-custodial wallet that YOU control.