Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Latest commit

 

History

History
417 lines (311 loc) · 13.9 KB

WalletApi.md

File metadata and controls

417 lines (311 loc) · 13.9 KB

BybitApi.WalletApi

All URIs are relative to https://api.bybit.com

Method HTTP request Description
walletExchangeOrder GET /v2/private/exchange-order/list Asset Exchange Records
walletGetBalance GET /v2/private/wallet/balance get wallet balance info
walletGetRecords GET /open-api/wallet/fund/records Get wallet fund records
walletGetRiskLimit GET /open-api/wallet/risk-limit/list Get risk limit.
walletSetRiskLimit POST /open-api/wallet/risk-limit Set risk limit
walletWithdraw GET /open-api/wallet/withdraw/list Get wallet fund records

walletExchangeOrder

Object walletExchangeOrder(opts)

Asset Exchange Records

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var opts = { 
  'limit': 8.14, // Number | Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page
  'from': 8.14, // Number | Start ID. By default, returns the latest IDs
  'direction': "direction_example" // String | Search direction. Prev: searches in ascending order from start ID, Next: searches in descending order from start ID. Defaults to Next
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletExchangeOrder(opts, callback);

Parameters

Name Type Description Notes
limit Number Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page [optional]
from Number Start ID. By default, returns the latest IDs [optional]
direction String Search direction. Prev: searches in ascending order from start ID, Next: searches in descending order from start ID. Defaults to Next [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

walletGetBalance

Object walletGetBalance(opts)

get wallet balance info

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var opts = { 
  'coin': "coin_example" // String | Coin.enum {BTC,EOS,XRP,ETH,USDT}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletGetBalance(opts, callback);

Parameters

Name Type Description Notes
coin String Coin.enum {BTC,EOS,XRP,ETH,USDT} [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

walletGetRecords

Object walletGetRecords(opts)

Get wallet fund records

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var opts = { 
  'startDate': "startDate_example", // String | Start point for result
  'endDate': "endDate_example", // String | End point for result
  'currency': "currency_example", // String | Currency type
  'walletFundType': "walletFundType_example", // String | wallet fund type
  'page': "page_example", // String | Page. Default getting first page data
  'limit': "limit_example" // String | Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletGetRecords(opts, callback);

Parameters

Name Type Description Notes
startDate String Start point for result [optional]
endDate String End point for result [optional]
currency String Currency type [optional]
walletFundType String wallet fund type [optional]
page String Page. Default getting first page data [optional]
limit String Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

walletGetRiskLimit

Object walletGetRiskLimit()

Get risk limit.

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletGetRiskLimit(callback);

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

walletSetRiskLimit

Object walletSetRiskLimit(symbol, riskId)

Set risk limit

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var symbol = "symbol_example"; // String | Contract type.

var riskId = 8.14; // Number | Risk ID. Can be found with the Get risk limit list endpoint.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletSetRiskLimit(symbol, riskId, callback);

Parameters

Name Type Description Notes
symbol String Contract type.
riskId Number Risk ID. Can be found with the Get risk limit list endpoint.

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

walletWithdraw

Object walletWithdraw(opts)

Get wallet fund records

Example

var BybitApi = require('bybit_api');
var defaultClient = BybitApi.ApiClient.instance;

// Configure API key authorization: apiKey
var apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';

// Configure API key authorization: apiSignature
var apiSignature = defaultClient.authentications['apiSignature'];
apiSignature.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.apiKeyPrefix = 'Token';

// Configure API key authorization: timestamp
var timestamp = defaultClient.authentications['timestamp'];
timestamp.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.apiKeyPrefix = 'Token';

var apiInstance = new BybitApi.WalletApi();

var opts = { 
  'startDate': "startDate_example", // String | Start point for result
  'endDate': "endDate_example", // String | End point for result
  'coin': "coin_example", // String | Currency
  'status': "status_example", // String | Withdraw status
  'page': "page_example", // String | Page. Default getting first page data
  'limit': "limit_example" // String | Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.walletWithdraw(opts, callback);

Parameters

Name Type Description Notes
startDate String Start point for result [optional]
endDate String End point for result [optional]
coin String Currency [optional]
status String Withdraw status [optional]
page String Page. Default getting first page data [optional]
limit String Limit for data size per page, max size is 50. Default as showing 20 pieces of data per page [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json