Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 2.67 KB

UserAffiliatesApi.md

File metadata and controls

77 lines (56 loc) · 2.67 KB

BitMexApi.UserAffiliatesApi

All URIs are relative to https://www.bitmex.com/api/v1

Method HTTP request Description
userAffiliatesGet GET /userAffiliates Get user's affiliates to a given depth

userAffiliatesGet

[XAny] userAffiliatesGet(opts)

Get user's affiliates to a given depth

Example

var BitMexApi = require('bit_mex_api');
var defaultClient = BitMexApi.ApiClient.instance;

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

// 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';

var apiInstance = new BitMexApi.UserAffiliatesApi();

var opts = { 
  'depth': 1.2, // Number | the depth of affiliates to return. Eg depth = 2 would return direct affiliates and their affiliates
  'targetAccountId': 1.2, // Number | AccountId of Sub-Affiliate Account
  'selectUserId': 1.2 // Number | User id of result array to keep
};

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

Parameters

Name Type Description Notes
depth Number the depth of affiliates to return. Eg depth = 2 would return direct affiliates and their affiliates [optional]
targetAccountId Number AccountId of Sub-Affiliate Account [optional]
selectUserId Number User id of result array to keep [optional]

Return type

[XAny]

Authorization

apiExpires, apiKey, apiSignature

HTTP request headers

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