TypeScript SDK — Market Data: Networks & Derivatives
Network and token discovery, FX rates, and perpetual funding data. All methods are on client.marketData. This group mixes public and authenticated endpoints — check the access level on each method. All are GET-backed and auto-retry on transient failures (429, 502, 503, 504).
getAssetsForNetwork
GET /v2/networks/{network}/assets · Authenticated
Returns the enabled assets (tokens) available for deposit and withdrawal on a specified blockchain network, filtered by your account's access permissions.
Code
The assets array is sorted alphabetically and contains only assets where your account has deposit and withdraw access enabled.
Tip: Your API key must have the Fund Manager or Auditor role. See Authentication for key setup.
Note: If the network is not supported or has no enabled assets, the API returns a 400 error.
getTokenNetworkV2
GET /v2/network/{token} · Authenticated
Returns the blockchain networks available for a given token, filtered by your account's deposit and withdraw permissions. Use this to discover which networks support a token before initiating a deposit or withdrawal.
Code
The network field is always an array and may contain one or more supported networks.
Tip: This is the recommended v2 replacement for the retired v1 network endpoint. Your API key must have the Fund Manager or Auditor role.
Note: If the token is not supported or your account has no available networks, the API returns a 404 with
reason: "UnsupportedNetwork".
getFXRate
GET /v2/fxrate/{symbol}/{timestamp} · Authenticated
Returns the FX rate for a given symbol at a specific point in time. Useful for historical reporting and reconciliation.
Code
The timestamp parameter accepts seconds or milliseconds since the Unix epoch. Gemini strongly recommends using milliseconds. The SDK accepts both bigint and number for this field — see Data Types for details on bigint timestamp handling.
Tip: The
ratefield is a number (not a string). Use a decimal library if you need exact arithmetic with FX rates.
getFundingAmount
GET /v1/fundingamount/{symbol} · Public
Returns the current and estimated next funding amount for a perpetual symbol.
Code
Tip: Use this alongside getRiskStats (in the Perpetuals namespace) for a complete view of perp market conditions.
getFundingAmountReportFile
GET /v1/fundingamountreport/records.xlsx · Public
Downloads a funding amount report as an Excel file. Unlike most SDK methods, this returns a file rather than a parsed JSON response.
Code
Available query parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Perpetual symbol (e.g. "BTCGUSDPERP"). |
fromDate | string | No | Start date in YYYY-MM-DD format. Mandatory if toDate is set. |
toDate | string | No | End date in YYYY-MM-DD format. Mandatory if fromDate is set. |
numRows | number | No | Maximum rows to return. Defaults to 8760 if omitted. |
When both a date range and numRows are specified, the API returns the minimum of the records in the date range and numRows.
Caveat: This method returns
{ bytes: Uint8Array, contentType?: string, contentDisposition?: string }, not a JSON object. The SDK does not parse the file contents — you receive the raw bytes.
Tip: Omitting both date fields fetches up to
numRowsrecords starting from the present and going backward.
What's next
- Symbols & Pricing — symbol discovery, ticker data, and price feeds
- Books, Trades & Candles — order book snapshots, trade history, and OHLCV data
- Data Types — decimal strings,
biginttimestamps, and safe arithmetic - Authentication — HMAC and OAuth setup for authenticated endpoints
- Error Handling — how the SDK surfaces API errors
- Full API Specifications — complete request/response schemas