---
title: "Gate Get Tickers JavaScript SDK Example | Siebly"
description: "Gate REST Futures get tickers JavaScript example for the Siebly Gate SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs."
canonical: "https://siebly.io/examples/Gate/Rest/futures/getTickers"
robots: "index,follow"
---

# Gate Get Tickers JavaScript SDK Example

Gate REST Futures get tickers JavaScript example for the Siebly Gate SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs.

**Path:** [Home](/) / [Examples](/examples) / [Gate](/examples/Gate) / [Rest](/examples/Gate/Rest) / [futures](/examples/Gate/Rest/futures) / [getTickers.ts](/examples/Gate/Rest/futures/getTickers)

[View source on GitHub](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Gate/Rest/futures/getTickers.ts)

[Open the Gate JavaScript SDK guide](/sdk/gate/javascript)

## getTickers.ts

```typescript
import { RestClient } from 'gateio-api';

// Define the account object with API key and secret
const account = {
  key: process.env.API_KEY || 'yourApiHere', // Replace 'yourApiHere' with your actual API key
  secret: process.env.API_SECRET || 'yourSecretHere', // Replace 'yourSecretHere' with your actual API secret
};

// Initialize the RestClient with the API credentials
const gateRestClient = new RestClient({
  apiKey: account.key,
  apiSecret: account.secret,
});

async function getFuturesTicker() {
  try {
    console.log('Using API keys:', account);

    // Fetch all futures tickers with USDT settlement
    const allTickers = await gateRestClient.getFuturesTickers({
      settle: 'usdt', // Specify the settlement currency
    });
    console.log('allTickers: ', allTickers); // Log the response to the console

    // Fetch a specific futures ticker with USDT settlement
    const ticker = await gateRestClient.getFuturesTickers({
      settle: 'usdt', // Specify the settlement currency
      contract: 'BTC_USDT', // Specify the contract
    });
    console.log('ticker: ', ticker); // Log the response to the console
  } catch (e) {
    console.error('Error in execution: ', e); // Log any errors that occur
  }
}

// Execute the function to get futures tickers
getFuturesTicker();
```
