The Graph API

The Graph API provides detailed information about various financial activities. With the use of this API, you can retrieve data about open interests, deposits, withdraws, open positions, open orders, portfolios, closed positions, and trade activities.

Base URL

The base URL for all the API endpoints is https://api.vela.exchange/graph. Example Request Base:

GET https://api.vela.exchange/graph/{ENDPOINT}/{chainId}/{address}

API Endpoints

An example of a request:

const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://api.vela.exchange/graph/deposits/42161/0xYourEthereumAddress',  // Update with your chainId and address
  headers: { }
};

axios(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

Errors

Our API uses conventional HTTP response codes to indicate success or failure of an API request. In general, 2xx indicates success, 4xx indicates an error from the client's side, and 5xx indicates an error from the server's side.

Last updated