Gateway

Add Network Token

Changed on

Add a custom token to Gateway's token list for a specific network.

Args: network_id: Network ID in format 'chain-network' (e.g., 'solana-mainnet-beta', 'ethereum-mainnet') token_request: Token details (address, symbol, name, decimals)

Example: POST /gateway/networks/ethereum-mainnet/tokens { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "symbol": "USDC", "name": "USD Coin", "decimals": 6 }

No Gateway restart is needed: the token list is read off disk per request, so the token is live as soon as this returns.

post/gateway/networks/{network_id}/tokens

Request

  • Base URL
    http://localhost:8000
  • URL
    http://localhost:8000/gateway/networks/{network_id}/tokens
  • Auth
    HTTP basic

Path parameters

network_idstring required

Request body

addressstring required

Token contract address

symbolstring required

Token symbol

namestring nullable

Token name (defaults to symbol)

decimalsinteger required

Number of decimals for the token

Response

Successful Response

object required

Changes