Skip to content
First Access Exchange

Endpoints

Every public name is served over HTTPS by one nginx. The chain id is firstaccess-testnet-1.

Node

APIEndpointUse it for
CometBFT RPChttps://rpc.testnet.firstaccess.exchangeBroadcasting transactions (broadcast_tx_sync, broadcast_tx_commit), blocks, tx by hash, abci_query on the stores. dYdX's TypeScript client connects here
RESThttps://api.testnet.firstaccess.exchangeEvery module's queries as JSON (Cosmos SDK, dYdX, x/binary), and transaction simulation
gRPCgrpc.testnet.firstaccess.exchange:443 (TLS)The same queries and cosmos.tx.v1beta1.Service. dYdX's Python client connects here
  • The RPC answers a fixed list of methods; pending transactions are not public, and /websocket is off (public RPC). GET / lists the methods.
  • The RPC, REST and gRPC are rate limited per IP (limits).
  • CORS on the RPC and REST allows any origin, so a browser can call them directly.
  • Values of type uint64 and SerializableInt are strings in REST JSON.
curl -s https://rpc.testnet.firstaccess.exchange/status
curl -s https://api.testnet.firstaccess.exchange/cosmos/base/tendermint/v1beta1/node_info
curl -s https://api.testnet.firstaccess.exchange/dydxprotocol/clob/clob_pair
# gRPC, with grpcurl and server reflection
grpcurl grpc.testnet.firstaccess.exchange:443 list
grpcurl -d '{"company_id": 1}' grpc.testnet.firstaccess.exchange:443 dydxprotocol.binary.Query/CompanyIndex

The node serves gRPC reflection, so grpcurl needs no proto files.

Indexer

APIEndpoint
HTTPhttps://indexer.testnet.firstaccess.exchange/v4
WebSocketwss://indexer.testnet.firstaccess.exchange/v4/ws

dYdX's indexer with its API unchanged, plus a chainMarket field on every chain market (indexer API).

Explorer and faucet

Endpoint
Explorerhttps://explorer.testnet.firstaccess.exchange (explorer)
Faucet statusGET https://app.testnet.firstaccess.exchange/faucet/status
Faucet dripPOST https://app.testnet.firstaccess.exchange/faucet/drip {"address": "dydx1..."} (quickstart)

Configuring dYdX's clients

dYdX's clients ship with dYdX's own networks; point them at this chain:

import { IndexerClient, IndexerConfig, ValidatorClient, ValidatorConfig } from '@dydxprotocol/v4-client-js';
 
const REST = 'https://api.testnet.firstaccess.exchange';
 
async function main() {
  // USDC is asset 0; read its denom from the chain.
  const { asset } = await (await fetch(`${REST}/dydxprotocol/assets/asset/0`)).json();
 
  const validator = await ValidatorClient.connect(
    new ValidatorConfig('https://rpc.testnet.firstaccess.exchange', 'firstaccess-testnet-1', {
      USDC_DENOM: asset.denom,
      USDC_DECIMALS: 6,
      CHAINTOKEN_DENOM: 'adv4tnt',
      CHAINTOKEN_DECIMALS: 18,
    }),
  );
  const indexer = new IndexerClient(
    new IndexerConfig(
      'https://indexer.testnet.firstaccess.exchange',
      'wss://indexer.testnet.firstaccess.exchange/v4/ws',
    ),
  );
}
 
main();

The TypeScript client's ValidatorConfig takes the RPC endpoint; the Python client's NodeConfig a gRPC channel, without a scheme. Both indexer clients take the indexer's base URL, without /v4.

Both clients work with our indexer unchanged. Checked against a local indexer built from this repository: TypeScript IndexerClient (utility.getHeight, markets.getPerpetualMarkets with chainMarket, getPerpetualMarketOrderbook on a binary's 0.001 book, getPerpetualMarketTrades), SocketClient (subscribeToMarkets), and Python IndexerClient (utility.get_height, markets.get_perpetual_markets, get_perpetual_market_orderbook).