> DOCS_V1.0

Developer Docs

Everything you need to build on Robinhood Chain with Greenbow. Connect your wallet, read stock token data, integrate Chainlink price feeds, and deploy autonomous agents.

01_ Quick Start

Greenbow runs on Robinhood Chain (RHC), an EVM-compatible L2 with near-zero gas fees. All stock tokens are ERC-20 contracts with real-time Chainlink price feeds. Get started in under 5 minutes.

Prerequisites

  • An EVM-compatible wallet (MetaMask, Rabby, etc.)
  • ETH for gas on RHC (near-zero cost)

Get Started

Greenbow is a hosted platform. No installation required. Use the web interface, Telegram bot, or API endpoints directly.

bash
# 1. Add RHC to your wallet
#    Chain ID: 4663
#    RPC: https://rpc.mainnet.chain.robinhood.com

# 2. Use the Greenbow API
curl https://greenbow.io/api/ticker

# 3. Chat with Greenbow AI
#    Web:  /chat
#    Telegram: @greenbow_bot
!

No setup needed. The chat interface, ticker API, and agent factory are all live at greenbow.io. Start building immediately.

02_ Connecting to RHC

Robinhood Chain is an EVM-compatible blockchain. To interact with stock tokens, you need to add RHC to your wallet. Below are the official network parameters.

Add RHC to Your Wallet

Network NameRobinhood Chain
Chain ID4663
RPC URLhttps://rpc.mainnet.chain.robinhood.com
Currency SymbolETH
Block Explorerhttps://explorer.chain.robinhood.com
Gas TokenETH (near-zero fees)

MetaMask — Add Programmatically

javascript
// Prompt user to add RHC to MetaMask
await window.ethereum.request({
  method: 'wallet_addEthereumChain',
  params: [{
    chainId: '0x1237',  // 4663 in hex
    chainName: 'Robinhood Chain',
    nativeCurrency: { name: 'ETH', symbol: 'ETH', decimals: 18 },
    rpcUrls: ['https://rpc.mainnet.chain.robinhood.com'],
    blockExplorerUrls: ['https://explorer.chain.robinhood.com']
  }]
});

viem / ethers Configuration

typescript
import { defineChain } from 'viem';

export const rhc = defineChain({
  id: 4663,
  name: 'Robinhood Chain',
  nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
  rpcUrls: { default: { http: 'https://rpc.mainnet.chain.robinhood.com' } },
  blockExplorers: { default: { url: 'https://explorer.chain.robinhood.com' } },
  testnet: false
});

03_ Reading Stock Token Data

Each stock on RHC is represented by an ERC-20 token contract. Token prices are updated via Chainlink price feeds. Use the contract addresses below to read balances, prices, and trade.

Token Contract Addresses

SymbolContract Address
AAPL0xaF3D76f1834A1d425780943C99Ea8A608f8a93f9
AMD0x86923f96303D656E4aa86D9d42D1e57ad2023fdC
NVDA0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC
TSLA0x322F0929c4625eD5bAd873c95208D54E1c003b2d
SPY0x117cc2133c37B721F49dE2A7a74833232B3B4C0C
MSFT0xe93237C50D904957Cf27E7B1133b510C669c2e74
GOOGL0x2e0847E8910a9732eB3fb1bb4b70a580ADAD4FE3
AMZN0x12f190a9F9d7D37a250758b26824B97CE941bF54
META0xc0D6457C16Cc70d6790Dd43521C899C87ce02f35
COIN0x6330D8C3178a418788dF01a47479c0ce7CCF450b
i

Click any address to copy it to your clipboard.

Read Token Balance (viem)

typescript
import { readContract } from 'viem';

const NVDA = '0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC';

// Read ERC-20 balance
const balance = await readContract(client, {
  address: NVDA,
  abi: erc20Abi,
  functionName: 'balanceOf',
  args: [userAddress]
});

console.log('NVDA balance:', balance);

05_ Agent Factory API

The Agent Factory lets you deploy autonomous trading agents on RHC. Each agent monitors price feeds, executes a strategy, and trades tokenized stocks according to your risk parameters.

How It Works

  1. Choose a strategy (Momentum, Mean Reversion, Pairs, Breakout, Dividend, Custom)
  2. Set your max allocation, risk level, and target tokens
  3. POST to /api/factory — Greenbow deploys and returns an agent config
  4. Your agent runs 24/7, monitored via the dashboard

Create an Agent

javascript
const res = await fetch('/api/factory', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'NVDA Sniper',
    strategy: 'momentum',
    riskLevel: 'medium',
    maxAllocation: 5000,
    tokens: ['NVDA', 'AMD']
  })
});

const agent = await res.json();
console.log('Agent ID:', agent.id);
console.log('Status:', agent.status);

Ready to deploy? Head to the Agent Factory dashboard →

06_ API Reference

All endpoints are relative to the Greenbow server root. No authentication required for public endpoints.

GET /api/ticker

Returns live stock prices and chain info. Aggregates real-time market data.

Response: { stocks: [symbol, price, change], chain: { block, chainId } }

POST /api/chat

Streaming chat with the Greenbow AI. Returns Server-Sent Events stream.

Body: { messages: [role, content] }

Response: SSE stream — data: { content: "..." } lines, terminated by data: [DONE]

GET /api/factory

Lists available strategies and tradeable tokens for agent deployment.

Response: { strategies: [...], tokens: [...] }

POST /api/factory

Deploys a new trading agent with the specified configuration.

Body: { name, strategy, riskLevel, maxAllocation, tokens }

Response: { id, name, strategy, riskLevel, maxAllocation, tokens, status, config }

GET /api/telegram

Sets up the Telegram webhook. Requires TELEGRAM_BOT_TOKEN environment variable. Called once during deployment.

Response: { ok: true, webhook: "..." }

POST /api/telegram

Handles incoming Telegram webhook messages. Processes user input, routes to the AI, and sends responses back to the chat.

Body: Telegram webhook payload (from Telegram API)

Response: 200 OK (async message dispatch)