Skip to content

Get Stock Token Address

Endpoint Information

Endpoint: GET /api/v1/instruments/token-address

Description: Get the token contract address for a stock based on ticker and exchange ID

Authentication: Authorization header with JWT token

Request Parameters

ParameterTypeRequiredDescription
tickerstringYesStock ticker symbol (e.g., AAPL)
exchangenumberYesExchange ID, see Exchange enum

Response Parameters

FieldTypeDescription
tickerstringStock ticker symbol
namestringStock name
exchange_idnumberExchange ID
token_addressstringToken contract address

Request Example

bash
curl -X GET "/api/v1/instruments/token-address?ticker=AAPL&exchange=0" \
     -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
     -H "Content-Type: application/json"

Response Examples

Success Response

json
{
  "code": 0,
  "data": {
    "ticker": "AAPL",
    "name": "Apple Inc.",
    "exchange_id": 0,
    "token_address": "0x1234567890abcdef..."
  }
}

Error Responses

Missing ticker parameter:

json
{
  "error": "ticker parameter is required"
}

Missing exchange parameter:

json
{
  "error": "exchange parameter is required"
}

Stock not found:

json
{
  "error": "Instrument not found"
}

Use Cases

  • Query token address before creating an order
  • Verify if a stock is available on the platform
  • Get basic information about a stock