Skip to content

Latest commit

 

History

History
157 lines (110 loc) · 6.29 KB

RebateApi.md

File metadata and controls

157 lines (110 loc) · 6.29 KB

GateApi\RebateApi

All URIs are relative to https://api.gateio.ws/api/v4

Method HTTP request Description
agencyTransactionHistory GET /rebate/agency/transaction_history The broker obtains the transaction history of the recommended user
agencyCommissionsHistory GET /rebate/agency/commission_history The broker obtains the commission history of the recommended user

agencyTransactionHistory

\GateApi\Model\AgencyTransactionHistory[] agencyTransactionHistory($currency_pair, $user_id, $from, $to, $limit, $offset)

The broker obtains the transaction history of the recommended user

Record time range cannot exceed 30 days

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Gate APIv4 authorization: apiv4
$config = GateApi\Configuration::getDefaultConfiguration()->setKey('YOUR_API_KEY')->setSecret('YOUR_API_SECRET');


$apiInstance = new GateApi\Api\RebateApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$associate_array['currency_pair'] = 'BTC_USDT'; // string | Specify the currency pair, if not specified, return all currency pairs
$associate_array['user_id'] = '10003'; // string | User ID. If not specified, all user records will be returned
$associate_array['from'] = 1602120000; // int | Time range beginning, default to 7 days before current time
$associate_array['to'] = 1602123600; // int | Time range ending, default to current time
$associate_array['limit'] = 100; // int | Maximum number of records to be returned in a single list
$associate_array['offset'] = 0; // int | List offset, starting from 0

try {
    $result = $apiInstance->agencyTransactionHistory($associate_array);
    print_r($result);
} catch (GateApi\GateApiException $e) {
    echo "Gate API Exception: label: {$e->getLabel()}, message: {$e->getMessage()}" . PHP_EOL;
} catch (Exception $e) {
    echo 'Exception when calling RebateApi->agencyTransactionHistory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Note: the input parameter is an associative array with the keys listed as the parameter name below.

Name Type Description Notes
currency_pair string Specify the currency pair, if not specified, return all currency pairs [optional]
user_id string User ID. If not specified, all user records will be returned [optional]
from int Time range beginning, default to 7 days before current time [optional]
to int Time range ending, default to current time [optional]
limit int Maximum number of records to be returned in a single list [optional] [default to 100]
offset int List offset, starting from 0 [optional] [default to 0]

Return type

\GateApi\Model\AgencyTransactionHistory[]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

agencyCommissionsHistory

\GateApi\Model\AgencyCommissionHistory[] agencyCommissionsHistory($currency, $user_id, $from, $to, $limit, $offset)

The broker obtains the commission history of the recommended user

Record time range cannot exceed 30 days

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Gate APIv4 authorization: apiv4
$config = GateApi\Configuration::getDefaultConfiguration()->setKey('YOUR_API_KEY')->setSecret('YOUR_API_SECRET');


$apiInstance = new GateApi\Api\RebateApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$associate_array['currency'] = 'BTC'; // string | Filter by currency. Return all currency records if not specified
$associate_array['user_id'] = '10003'; // string | User ID. If not specified, all user records will be returned
$associate_array['from'] = 1602120000; // int | Time range beginning, default to 7 days before current time
$associate_array['to'] = 1602123600; // int | Time range ending, default to current time
$associate_array['limit'] = 100; // int | Maximum number of records to be returned in a single list
$associate_array['offset'] = 0; // int | List offset, starting from 0

try {
    $result = $apiInstance->agencyCommissionsHistory($associate_array);
    print_r($result);
} catch (GateApi\GateApiException $e) {
    echo "Gate API Exception: label: {$e->getLabel()}, message: {$e->getMessage()}" . PHP_EOL;
} catch (Exception $e) {
    echo 'Exception when calling RebateApi->agencyCommissionsHistory: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Note: the input parameter is an associative array with the keys listed as the parameter name below.

Name Type Description Notes
currency string Filter by currency. Return all currency records if not specified [optional]
user_id string User ID. If not specified, all user records will be returned [optional]
from int Time range beginning, default to 7 days before current time [optional]
to int Time range ending, default to current time [optional]
limit int Maximum number of records to be returned in a single list [optional] [default to 100]
offset int List offset, starting from 0 [optional] [default to 0]

Return type

\GateApi\Model\AgencyCommissionHistory[]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]