Skip to main contentThe Sequencer Node provides access to the canonical history of the exchange, including blocks, transactions, and market statistics.
Endpoint: https://rpc.spectre.exchange
Blocks
spectre_blockNumber
Returns the height of the most recent block.
Returns: string (Hex, e.g., “0x1a4”)
spectre_getBlockByNumber
Fetch a block by its height.
Parameters:
block_number (string): Hex string, “latest”, or “earliest”.
full_transactions (boolean): If true, returns full transaction objects. If false, returns only hashes.
spectre_getBlockByHash
Fetch a block by its hash.
Parameters:
block_hash (string): The 32-byte block hash.
full_transactions (boolean)
Transactions
spectre_getTransactionByHash
Get details of a specific transaction.
Parameters:
Returns:
hash, blockNumber, market, type (LIMIT, MARKET, etc.), price, quantity, timestamp.
spectre_getTransactionsByMarket
Get a list of recent transactions for a specific market (e.g., Trade History).
Parameters:
market (string): e.g., “BTC-USDC”
limit (int): default 100
offset (int): default 0
sort (string): “desc” or “asc”
spectre_getTransactionsByType
Filter transactions by their type across the network or for a specific market.
Parameters:
market (string, optional)
tx_type (string, optional): “TRADE”, “CLOSE_POSITION”, “OPEN_POSITION”
limit, offset, sort
Market Statistics & Charts
spectre_getOHLC
Get candlestick data formatted for charts (TradingView).
Parameters:
market (string): “BTC-USDC”
timeframe (string): “1m”, “5m”, “15m”, “1h”, “4h”, “1d”
start (int, optional): Start timestamp (ms)
end (int, optional): End timestamp (ms)
limit (int): Max candles
Returns:
List of objects: { time, open, high, low, close, volume }
spectre_getStatistics
Get 24-hour rolling statistics.
Parameters:
Returns:
high, low, volume, last_price, price_change_percent.
spectre_getPositions
Get all currently open positions.
Parameters:
market (string, optional)