diff --git a/README.md b/README.md index 6f6bdcf..97d93c0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## gate-api@5.40.0 +## gate-api@5.45.0 TypeScript NodeJS client for gate-api. @@ -8,7 +8,7 @@ APIv4 provides spot, margin and futures trading operations. There are public API This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 4.40.0 +- API version: 4.45.0 - Package version: - Build package: org.openapitools.codegen.languages.TypeScriptNodeClientCodegen For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts) @@ -64,10 +64,11 @@ const GateApi = require('gate-api'); const client = new GateApi.ApiClient(); // uncomment the next line to change base path // client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); -const api = new GateApi.DeliveryApi(client); -const settle = "usdt"; // 'usdt' | 'btc' | Settle currency -api.listDeliveryContracts(settle) +const api = new GateApi.AccountApi(client); +api.getAccountDetail() .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -78,6 +79,7 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AccountApi* | [**getAccountDetail**](docs/AccountApi.md#getAccountDetail) | **GET** /account/detail | Get account detail *DeliveryApi* | [**listDeliveryContracts**](docs/DeliveryApi.md#listDeliveryContracts) | **GET** /delivery/{settle}/contracts | List all futures contracts *DeliveryApi* | [**getDeliveryContract**](docs/DeliveryApi.md#getDeliveryContract) | **GET** /delivery/{settle}/contracts/{contract} | Get a single contract *DeliveryApi* | [**listDeliveryOrderBook**](docs/DeliveryApi.md#listDeliveryOrderBook) | **GET** /delivery/{settle}/order_book | Futures order book @@ -106,6 +108,14 @@ Class | Method | HTTP request | Description *DeliveryApi* | [**cancelPriceTriggeredDeliveryOrderList**](docs/DeliveryApi.md#cancelPriceTriggeredDeliveryOrderList) | **DELETE** /delivery/{settle}/price_orders | Cancel all open orders *DeliveryApi* | [**getPriceTriggeredDeliveryOrder**](docs/DeliveryApi.md#getPriceTriggeredDeliveryOrder) | **GET** /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order *DeliveryApi* | [**cancelPriceTriggeredDeliveryOrder**](docs/DeliveryApi.md#cancelPriceTriggeredDeliveryOrder) | **DELETE** /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order +*EarnUniApi* | [**listUniCurrencies**](docs/EarnUniApi.md#listUniCurrencies) | **GET** /earn/uni/currencies | List currencies for lending +*EarnUniApi* | [**getUniCurrency**](docs/EarnUniApi.md#getUniCurrency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending +*EarnUniApi* | [**listUserUniLends**](docs/EarnUniApi.md#listUserUniLends) | **GET** /earn/uni/lends | List user\'s lending orders +*EarnUniApi* | [**createUniLend**](docs/EarnUniApi.md#createUniLend) | **POST** /earn/uni/lends | Lend or redeem +*EarnUniApi* | [**changeUniLend**](docs/EarnUniApi.md#changeUniLend) | **PATCH** /earn/uni/lends | Amend lending order +*EarnUniApi* | [**listUniLendRecords**](docs/EarnUniApi.md#listUniLendRecords) | **GET** /earn/uni/lend_records | List records of lending +*EarnUniApi* | [**getUniInterest**](docs/EarnUniApi.md#getUniInterest) | **GET** /earn/uni/interests/{currency} | Get the user\'s total interest income of specified currency +*EarnUniApi* | [**listUniInterestRecords**](docs/EarnUniApi.md#listUniInterestRecords) | **GET** /earn/uni/interest_records | List interest records *FlashSwapApi* | [**listFlashSwapCurrencies**](docs/FlashSwapApi.md#listFlashSwapCurrencies) | **GET** /flash_swap/currencies | List all supported currencies in flash swap *FlashSwapApi* | [**listFlashSwapOrders**](docs/FlashSwapApi.md#listFlashSwapOrders) | **GET** /flash_swap/orders | List all flash swap orders *FlashSwapApi* | [**createFlashSwapOrder**](docs/FlashSwapApi.md#createFlashSwapOrder) | **POST** /flash_swap/orders | Create a flash swap order @@ -153,27 +163,27 @@ Class | Method | HTTP request | Description *FuturesApi* | [**cancelPriceTriggeredOrderList**](docs/FuturesApi.md#cancelPriceTriggeredOrderList) | **DELETE** /futures/{settle}/price_orders | Cancel all open orders *FuturesApi* | [**getPriceTriggeredOrder**](docs/FuturesApi.md#getPriceTriggeredOrder) | **GET** /futures/{settle}/price_orders/{order_id} | Get a price-triggered order *FuturesApi* | [**cancelPriceTriggeredOrder**](docs/FuturesApi.md#cancelPriceTriggeredOrder) | **DELETE** /futures/{settle}/price_orders/{order_id} | cancel a price-triggered order -*MarginApi* | [**listMarginCurrencyPairs**](docs/MarginApi.md#listMarginCurrencyPairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading -*MarginApi* | [**getMarginCurrencyPair**](docs/MarginApi.md#getMarginCurrencyPair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair -*MarginApi* | [**listFundingBook**](docs/MarginApi.md#listFundingBook) | **GET** /margin/funding_book | Order book of lending loans *MarginApi* | [**listMarginAccounts**](docs/MarginApi.md#listMarginAccounts) | **GET** /margin/accounts | Margin account list *MarginApi* | [**listMarginAccountBook**](docs/MarginApi.md#listMarginAccountBook) | **GET** /margin/account_book | List margin account balance change history *MarginApi* | [**listFundingAccounts**](docs/MarginApi.md#listFundingAccounts) | **GET** /margin/funding_accounts | Funding account list -*MarginApi* | [**listLoans**](docs/MarginApi.md#listLoans) | **GET** /margin/loans | List all loans -*MarginApi* | [**createLoan**](docs/MarginApi.md#createLoan) | **POST** /margin/loans | Lend or borrow -*MarginApi* | [**mergeLoans**](docs/MarginApi.md#mergeLoans) | **POST** /margin/merged_loans | Merge multiple lending loans -*MarginApi* | [**getLoan**](docs/MarginApi.md#getLoan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail -*MarginApi* | [**cancelLoan**](docs/MarginApi.md#cancelLoan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan -*MarginApi* | [**updateLoan**](docs/MarginApi.md#updateLoan) | **PATCH** /margin/loans/{loan_id} | Modify a loan -*MarginApi* | [**listLoanRepayments**](docs/MarginApi.md#listLoanRepayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records -*MarginApi* | [**repayLoan**](docs/MarginApi.md#repayLoan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan -*MarginApi* | [**listLoanRecords**](docs/MarginApi.md#listLoanRecords) | **GET** /margin/loan_records | List repayment records of a specific loan -*MarginApi* | [**getLoanRecord**](docs/MarginApi.md#getLoanRecord) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record -*MarginApi* | [**updateLoanRecord**](docs/MarginApi.md#updateLoanRecord) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record *MarginApi* | [**getAutoRepayStatus**](docs/MarginApi.md#getAutoRepayStatus) | **GET** /margin/auto_repay | Retrieve user auto repayment setting *MarginApi* | [**setAutoRepay**](docs/MarginApi.md#setAutoRepay) | **POST** /margin/auto_repay | Update user\'s auto repayment setting *MarginApi* | [**getMarginTransferable**](docs/MarginApi.md#getMarginTransferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -*MarginApi* | [**getMarginBorrowable**](docs/MarginApi.md#getMarginBorrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency +*MarginApi* | [**listMarginCurrencyPairs**](docs/MarginApi.md#listMarginCurrencyPairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading(Deprecated) +*MarginApi* | [**getMarginCurrencyPair**](docs/MarginApi.md#getMarginCurrencyPair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair(Deprecated) +*MarginApi* | [**listFundingBook**](docs/MarginApi.md#listFundingBook) | **GET** /margin/funding_book | Order book of lending loans(Deprecated) +*MarginApi* | [**listLoans**](docs/MarginApi.md#listLoans) | **GET** /margin/loans | List all loans(Deprecated) +*MarginApi* | [**createLoan**](docs/MarginApi.md#createLoan) | **POST** /margin/loans | Lend or borrow(Deprecated) +*MarginApi* | [**mergeLoans**](docs/MarginApi.md#mergeLoans) | **POST** /margin/merged_loans | Merge multiple lending loans(Deprecated) +*MarginApi* | [**getLoan**](docs/MarginApi.md#getLoan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail(Deprecated) +*MarginApi* | [**cancelLoan**](docs/MarginApi.md#cancelLoan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan(Deprecated) +*MarginApi* | [**updateLoan**](docs/MarginApi.md#updateLoan) | **PATCH** /margin/loans/{loan_id} | Modify a loan(Deprecated) +*MarginApi* | [**listLoanRepayments**](docs/MarginApi.md#listLoanRepayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records(Deprecated) +*MarginApi* | [**repayLoan**](docs/MarginApi.md#repayLoan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan(Deprecated) +*MarginApi* | [**listLoanRecords**](docs/MarginApi.md#listLoanRecords) | **GET** /margin/loan_records | List repayment records of a specific loan(Deprecated) +*MarginApi* | [**getLoanRecord**](docs/MarginApi.md#getLoanRecord) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record(Deprecated) +*MarginApi* | [**updateLoanRecord**](docs/MarginApi.md#updateLoanRecord) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record(Deprecated) +*MarginApi* | [**getMarginBorrowable**](docs/MarginApi.md#getMarginBorrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency(Deprecated) *MarginApi* | [**listCrossMarginCurrencies**](docs/MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin. *MarginApi* | [**getCrossMarginCurrency**](docs/MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin *MarginApi* | [**getCrossMarginAccount**](docs/MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account @@ -183,8 +193,16 @@ Class | Method | HTTP request | Description *MarginApi* | [**getCrossMarginLoan**](docs/MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail *MarginApi* | [**listCrossMarginRepayments**](docs/MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments *MarginApi* | [**repayCrossMarginLoan**](docs/MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments +*MarginApi* | [**getCrossMarginInterestRecords**](docs/MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account *MarginApi* | [**getCrossMarginTransferable**](docs/MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency *MarginApi* | [**getCrossMarginBorrowable**](docs/MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency +*MarginUniApi* | [**listUniCurrencyPairs**](docs/MarginUniApi.md#listUniCurrencyPairs) | **GET** /margin/uni/currency_pairs | List lending markets +*MarginUniApi* | [**getUniCurrencyPair**](docs/MarginUniApi.md#getUniCurrencyPair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +*MarginUniApi* | [**listUniLoans**](docs/MarginUniApi.md#listUniLoans) | **GET** /margin/uni/loans | List loans +*MarginUniApi* | [**createUniLoan**](docs/MarginUniApi.md#createUniLoan) | **POST** /margin/uni/loans | Borrow or repay +*MarginUniApi* | [**listUniLoanRecords**](docs/MarginUniApi.md#listUniLoanRecords) | **GET** /margin/uni/loan_records | Get load records +*MarginUniApi* | [**listUniLoanInterestRecords**](docs/MarginUniApi.md#listUniLoanInterestRecords) | **GET** /margin/uni/interest_records | List interest records +*MarginUniApi* | [**getUniBorrowable**](docs/MarginUniApi.md#getUniBorrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable *OptionsApi* | [**listOptionsUnderlyings**](docs/OptionsApi.md#listOptionsUnderlyings) | **GET** /options/underlyings | List all underlyings *OptionsApi* | [**listOptionsExpirations**](docs/OptionsApi.md#listOptionsExpirations) | **GET** /options/expirations | List all expiration times *OptionsApi* | [**listOptionsContracts**](docs/OptionsApi.md#listOptionsContracts) | **GET** /options/contracts | List all the contracts with specified underlying and expiration time @@ -273,6 +291,7 @@ Class | Method | HTTP request | Description ## Documentation for Models - [AccountBalance](docs/AccountBalance.md) + - [AccountDetail](docs/AccountDetail.md) - [AgencyCommission](docs/AgencyCommission.md) - [AgencyCommissionHistory](docs/AgencyCommissionHistory.md) - [AgencyTransaction](docs/AgencyTransaction.md) @@ -287,9 +306,12 @@ Class | Method | HTTP request | Description - [ContractStat](docs/ContractStat.md) - [CountdownCancelAllFuturesTask](docs/CountdownCancelAllFuturesTask.md) - [CountdownCancelAllSpotTask](docs/CountdownCancelAllSpotTask.md) + - [CreateUniLend](docs/CreateUniLend.md) + - [CreateUniLoan](docs/CreateUniLoan.md) - [CrossMarginAccount](docs/CrossMarginAccount.md) - [CrossMarginAccountBook](docs/CrossMarginAccountBook.md) - [CrossMarginBalance](docs/CrossMarginBalance.md) + - [CrossMarginBalance1](docs/CrossMarginBalance1.md) - [CrossMarginBorrowable](docs/CrossMarginBorrowable.md) - [CrossMarginCurrency](docs/CrossMarginCurrency.md) - [CrossMarginLoan](docs/CrossMarginLoan.md) @@ -306,6 +328,7 @@ Class | Method | HTTP request | Description - [FlashSwapOrder](docs/FlashSwapOrder.md) - [FlashSwapOrderPreview](docs/FlashSwapOrderPreview.md) - [FlashSwapOrderRequest](docs/FlashSwapOrderRequest.md) + - [FlashSwapPreviewRequest](docs/FlashSwapPreviewRequest.md) - [FundingAccount](docs/FundingAccount.md) - [FundingBookItem](docs/FundingBookItem.md) - [FundingRateRecord](docs/FundingRateRecord.md) @@ -339,8 +362,10 @@ Class | Method | HTTP request | Description - [MarginBorrowable](docs/MarginBorrowable.md) - [MarginCurrencyPair](docs/MarginCurrencyPair.md) - [MarginTransferable](docs/MarginTransferable.md) + - [MaxUniBorrowable](docs/MaxUniBorrowable.md) - [MultiChainAddressItem](docs/MultiChainAddressItem.md) - [MyFuturesTrade](docs/MyFuturesTrade.md) + - [MyFuturesTradeTimeRange](docs/MyFuturesTradeTimeRange.md) - [OpenOrders](docs/OpenOrders.md) - [OptionsAccount](docs/OptionsAccount.md) - [OptionsAccountBook](docs/OptionsAccountBook.md) @@ -359,6 +384,7 @@ Class | Method | HTTP request | Description - [Order](docs/Order.md) - [OrderBook](docs/OrderBook.md) - [OrderPatch](docs/OrderPatch.md) + - [PatchUniLend](docs/PatchUniLend.md) - [Position](docs/Position.md) - [PositionClose](docs/PositionClose.md) - [PositionCloseOrder](docs/PositionCloseOrder.md) @@ -388,6 +414,15 @@ Class | Method | HTTP request | Description - [Transfer](docs/Transfer.md) - [TriggerOrderResponse](docs/TriggerOrderResponse.md) - [TriggerTime](docs/TriggerTime.md) + - [UniCurrency](docs/UniCurrency.md) + - [UniCurrencyPair](docs/UniCurrencyPair.md) + - [UniInterestRecord](docs/UniInterestRecord.md) + - [UniLend](docs/UniLend.md) + - [UniLendInterest](docs/UniLendInterest.md) + - [UniLendRecord](docs/UniLendRecord.md) + - [UniLoan](docs/UniLoan.md) + - [UniLoanInterestRecord](docs/UniLoanInterestRecord.md) + - [UniLoanRecord](docs/UniLoanRecord.md) - [WithdrawStatus](docs/WithdrawStatus.md) diff --git a/api/accountApi.ts b/api/accountApi.ts new file mode 100644 index 0000000..eb86480 --- /dev/null +++ b/api/accountApi.ts @@ -0,0 +1,59 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-locals */ +import { AccountDetail } from '../model/accountDetail'; +import { ObjectSerializer } from '../model/models'; +import { ApiClient } from './apiClient'; +import { AxiosRequestConfig, AxiosResponse } from 'axios'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export class AccountApi { + protected client: ApiClient; + + constructor(client?: ApiClient) { + if (client) { + this.client = client; + } else { + this.client = new ApiClient(); + } + } + + /** + * + * @summary Get account detail + */ + public async getAccountDetail(): Promise<{ response: AxiosResponse; body: AccountDetail }> { + const localVarPath = this.client.basePath + '/account/detail'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request(config, 'AccountDetail', authSettings); + } +} diff --git a/api/apis.ts b/api/apis.ts index a591c44..a7e9496 100644 --- a/api/apis.ts +++ b/api/apis.ts @@ -1,12 +1,18 @@ export * from './apiClient'; +export * from './accountApi'; +import { AccountApi } from './accountApi'; export * from './deliveryApi'; import { DeliveryApi } from './deliveryApi'; +export * from './earnUniApi'; +import { EarnUniApi } from './earnUniApi'; export * from './flashSwapApi'; import { FlashSwapApi } from './flashSwapApi'; export * from './futuresApi'; import { FuturesApi } from './futuresApi'; export * from './marginApi'; import { MarginApi } from './marginApi'; +export * from './marginUniApi'; +import { MarginUniApi } from './marginUniApi'; export * from './optionsApi'; import { OptionsApi } from './optionsApi'; export * from './rebateApi'; @@ -21,10 +27,13 @@ export * from './withdrawalApi'; import { WithdrawalApi } from './withdrawalApi'; export const APIS = [ + AccountApi, DeliveryApi, + EarnUniApi, FlashSwapApi, FuturesApi, MarginApi, + MarginUniApi, OptionsApi, RebateApi, SpotApi, diff --git a/api/earnUniApi.ts b/api/earnUniApi.ts new file mode 100644 index 0000000..fd268dc --- /dev/null +++ b/api/earnUniApi.ts @@ -0,0 +1,339 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-locals */ +import { CreateUniLend } from '../model/createUniLend'; +import { PatchUniLend } from '../model/patchUniLend'; +import { UniCurrency } from '../model/uniCurrency'; +import { UniInterestRecord } from '../model/uniInterestRecord'; +import { UniLend } from '../model/uniLend'; +import { UniLendInterest } from '../model/uniLendInterest'; +import { UniLendRecord } from '../model/uniLendRecord'; +import { ObjectSerializer } from '../model/models'; +import { ApiClient } from './apiClient'; +import { AxiosRequestConfig, AxiosResponse } from 'axios'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export class EarnUniApi { + protected client: ApiClient; + + constructor(client?: ApiClient) { + if (client) { + this.client = client; + } else { + this.client = new ApiClient(); + } + } + + /** + * + * @summary List currencies for lending + */ + public async listUniCurrencies(): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/earn/uni/currencies'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = []; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Get currency detail for lending + * @param currency Currency + */ + public async getUniCurrency(currency: string): Promise<{ response: AxiosResponse; body: UniCurrency }> { + const localVarPath = + this.client.basePath + + '/earn/uni/currencies/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + // verify required parameter 'currency' is not null or undefined + if (currency === null || currency === undefined) { + throw new Error('Required parameter currency was null or undefined when calling getUniCurrency.'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = []; + return this.client.request(config, 'UniCurrency', authSettings); + } + + /** + * + * @summary List user\'s lending orders + * @param opts Optional parameters + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async listUserUniLends(opts: { + currency?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/earn/uni/lends'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * `Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. + * @summary Lend or redeem + * @param createUniLend + */ + public async createUniLend(createUniLend: CreateUniLend): Promise<{ response: AxiosResponse; body?: any }> { + const localVarPath = this.client.basePath + '/earn/uni/lends'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + + // verify required parameter 'createUniLend' is not null or undefined + if (createUniLend === null || createUniLend === undefined) { + throw new Error('Required parameter createUniLend was null or undefined when calling createUniLend.'); + } + + const config: AxiosRequestConfig = { + method: 'POST', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + data: ObjectSerializer.serialize(createUniLend, 'CreateUniLend'), + }; + + const authSettings = ['apiv4']; + return this.client.request(config, '', authSettings); + } + + /** + * Currently only supports amending the minimum interest rate (hour) + * @summary Amend lending order + * @param patchUniLend + */ + public async changeUniLend(patchUniLend: PatchUniLend): Promise<{ response: AxiosResponse; body?: any }> { + const localVarPath = this.client.basePath + '/earn/uni/lends'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + + // verify required parameter 'patchUniLend' is not null or undefined + if (patchUniLend === null || patchUniLend === undefined) { + throw new Error('Required parameter patchUniLend was null or undefined when calling changeUniLend.'); + } + + const config: AxiosRequestConfig = { + method: 'PATCH', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + data: ObjectSerializer.serialize(patchUniLend, 'PatchUniLend'), + }; + + const authSettings = ['apiv4']; + return this.client.request(config, '', authSettings); + } + + /** + * + * @summary List records of lending + * @param opts Optional parameters + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + * @param opts.type type: lend - lend, redeem - redeem + */ + public async listUniLendRecords(opts: { + currency?: string; + page?: number; + limit?: number; + type?: 'lend' | 'redeem'; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/earn/uni/lend_records'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + if (opts.type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'lend' | 'redeem'"); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Get the user\'s total interest income of specified currency + * @param currency Currency + */ + public async getUniInterest(currency: string): Promise<{ response: AxiosResponse; body: UniLendInterest }> { + const localVarPath = + this.client.basePath + + '/earn/uni/interests/{currency}'.replace('{' + 'currency' + '}', encodeURIComponent(String(currency))); + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + // verify required parameter 'currency' is not null or undefined + if (currency === null || currency === undefined) { + throw new Error('Required parameter currency was null or undefined when calling getUniInterest.'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request(config, 'UniLendInterest', authSettings); + } + + /** + * + * @summary List interest records + * @param opts Optional parameters + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async listUniInterestRecords(opts: { + currency?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/earn/uni/interest_records'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } +} diff --git a/api/flashSwapApi.ts b/api/flashSwapApi.ts index f218c47..a0b3668 100644 --- a/api/flashSwapApi.ts +++ b/api/flashSwapApi.ts @@ -14,6 +14,7 @@ import { FlashSwapCurrency } from '../model/flashSwapCurrency'; import { FlashSwapOrder } from '../model/flashSwapOrder'; import { FlashSwapOrderPreview } from '../model/flashSwapOrderPreview'; import { FlashSwapOrderRequest } from '../model/flashSwapOrderRequest'; +import { FlashSwapPreviewRequest } from '../model/flashSwapPreviewRequest'; import { ObjectSerializer } from '../model/models'; import { ApiClient } from './apiClient'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; @@ -202,10 +203,10 @@ export class FlashSwapApi { /** * * @summary Initiate a flash swap order preview - * @param flashSwapOrderRequest + * @param flashSwapPreviewRequest */ public async previewFlashSwapOrder( - flashSwapOrderRequest: FlashSwapOrderRequest, + flashSwapPreviewRequest: FlashSwapPreviewRequest, ): Promise<{ response: AxiosResponse; body: FlashSwapOrderPreview }> { const localVarPath = this.client.basePath + '/flash_swap/orders/preview'; const localVarQueryParameters: any = {}; @@ -218,10 +219,10 @@ export class FlashSwapApi { localVarHeaderParams.Accept = produces.join(','); } - // verify required parameter 'flashSwapOrderRequest' is not null or undefined - if (flashSwapOrderRequest === null || flashSwapOrderRequest === undefined) { + // verify required parameter 'flashSwapPreviewRequest' is not null or undefined + if (flashSwapPreviewRequest === null || flashSwapPreviewRequest === undefined) { throw new Error( - 'Required parameter flashSwapOrderRequest was null or undefined when calling previewFlashSwapOrder.', + 'Required parameter flashSwapPreviewRequest was null or undefined when calling previewFlashSwapOrder.', ); } @@ -230,7 +231,7 @@ export class FlashSwapApi { params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, - data: ObjectSerializer.serialize(flashSwapOrderRequest, 'FlashSwapOrderRequest'), + data: ObjectSerializer.serialize(flashSwapPreviewRequest, 'FlashSwapPreviewRequest'), }; const authSettings = ['apiv4']; diff --git a/api/futuresApi.ts b/api/futuresApi.ts index 0ab98c0..e279cb1 100644 --- a/api/futuresApi.ts +++ b/api/futuresApi.ts @@ -30,6 +30,7 @@ import { FuturesTicker } from '../model/futuresTicker'; import { FuturesTrade } from '../model/futuresTrade'; import { InsuranceRecord } from '../model/insuranceRecord'; import { MyFuturesTrade } from '../model/myFuturesTrade'; +import { MyFuturesTradeTimeRange } from '../model/myFuturesTradeTimeRange'; import { Position } from '../model/position'; import { PositionClose } from '../model/positionClose'; import { TriggerOrderResponse } from '../model/triggerOrderResponse'; @@ -1500,7 +1501,7 @@ export class FuturesApi { } /** - * - Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 + * - Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body * @summary Create a futures order * @param settle Settle currency * @param futuresOrder @@ -1802,7 +1803,7 @@ export class FuturesApi { * @param opts.order Futures order ID, return related data only if specified * @param opts.limit Maximum number of records to be returned in a single list * @param opts.offset List offset, starting from 0 - * @param opts.lastId Specify list staring point using the `id` of last record in previous list-query results + * @param opts.lastId Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using \'GET /futures/{settle}/my_trades_timerange\'. */ public async getMyTrades( settle: 'btc' | 'usdt' | 'usd', @@ -1872,7 +1873,7 @@ export class FuturesApi { public async getMyTradesWithTimeRange( settle: 'btc' | 'usdt' | 'usd', opts: { contract?: string; from?: number; to?: number; limit?: number; offset?: number }, - ): Promise<{ response: AxiosResponse; body: Array }> { + ): Promise<{ response: AxiosResponse; body: Array }> { const localVarPath = this.client.basePath + '/futures/{settle}/my_trades_timerange'.replace('{' + 'settle' + '}', encodeURIComponent(String(settle))); @@ -1920,7 +1921,11 @@ export class FuturesApi { }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request>( + config, + 'Array', + authSettings, + ); } /** diff --git a/api/marginApi.ts b/api/marginApi.ts index aa0a901..0a315ac 100644 --- a/api/marginApi.ts +++ b/api/marginApi.ts @@ -31,6 +31,7 @@ import { MarginCurrencyPair } from '../model/marginCurrencyPair'; import { MarginTransferable } from '../model/marginTransferable'; import { RepayRequest } from '../model/repayRequest'; import { Repayment } from '../model/repayment'; +import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord'; import { ObjectSerializer } from '../model/models'; import { ApiClient } from './apiClient'; import { AxiosRequestConfig, AxiosResponse } from 'axios'; @@ -52,10 +53,14 @@ export class MarginApi { /** * - * @summary List all supported currency pairs supported in margin trading + * @summary Margin account list + * @param opts Optional parameters + * @param opts.currencyPair Currency pair */ - public async listMarginCurrencyPairs(): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/margin/currency_pairs'; + public async listMarginAccounts(opts: { + currencyPair?: string; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/accounts'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -66,6 +71,11 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } + opts = opts || {}; + if (opts.currencyPair !== undefined) { + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -73,24 +83,30 @@ export class MarginApi { url: localVarPath, }; - const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); } /** - * - * @summary Query one single margin currency pair - * @param currencyPair Margin currency pair + * Only transferals from and to margin account are provided for now. Time range allows 30 days at most + * @summary List margin account balance change history + * @param opts Optional parameters + * @param opts.currency List records related to specified currency only. If specified, `currency_pair` is also required. + * @param opts.currencyPair List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + * @param opts.from Start timestamp of the query + * @param opts.to Time range ending, default to current time + * @param opts.page Page number + * @param opts.limit Maximum number of records to be returned in a single list */ - public async getMarginCurrencyPair( - currencyPair: string, - ): Promise<{ response: AxiosResponse; body: MarginCurrencyPair }> { - const localVarPath = - this.client.basePath + - '/margin/currency_pairs/{currency_pair}'.replace( - '{' + 'currency_pair' + '}', - encodeURIComponent(String(currencyPair)), - ); + public async listMarginAccountBook(opts: { + currency?: string; + currencyPair?: string; + from?: number; + to?: number; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/account_book'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -101,11 +117,29 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } - // verify required parameter 'currencyPair' is not null or undefined - if (currencyPair === null || currencyPair === undefined) { - throw new Error( - 'Required parameter currencyPair was null or undefined when calling getMarginCurrencyPair.', - ); + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.currencyPair !== undefined) { + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + } + + if (opts.from !== undefined) { + localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); + } + + if (opts.to !== undefined) { + localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); } const config: AxiosRequestConfig = { @@ -115,17 +149,20 @@ export class MarginApi { url: localVarPath, }; - const authSettings = []; - return this.client.request(config, 'MarginCurrencyPair', authSettings); + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); } /** * - * @summary Order book of lending loans - * @param currency Retrieve data of the specified currency + * @summary Funding account list + * @param opts Optional parameters + * @param opts.currency Retrieve data of the specified currency */ - public async listFundingBook(currency: string): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/margin/funding_book'; + public async listFundingAccounts(opts: { + currency?: string; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/funding_accounts'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -136,12 +173,37 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } - // verify required parameter 'currency' is not null or undefined - if (currency === null || currency === undefined) { - throw new Error('Required parameter currency was null or undefined when calling listFundingBook.'); + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); } - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Retrieve user auto repayment setting + */ + public async getAutoRepayStatus(): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { + const localVarPath = this.client.basePath + '/margin/auto_repay'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } const config: AxiosRequestConfig = { method: 'GET', @@ -150,20 +212,17 @@ export class MarginApi { url: localVarPath, }; - const authSettings = []; - return this.client.request>(config, 'Array', authSettings); + const authSettings = ['apiv4']; + return this.client.request(config, 'AutoRepaySetting', authSettings); } /** * - * @summary Margin account list - * @param opts Optional parameters - * @param opts.currencyPair Currency pair + * @summary Update user\'s auto repayment setting + * @param status New auto repayment status. `on` - enabled, `off` - disabled */ - public async listMarginAccounts(opts: { - currencyPair?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/margin/accounts'; + public async setAutoRepay(status: string): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { + const localVarPath = this.client.basePath + '/margin/auto_repay'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -174,42 +233,36 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } - opts = opts || {}; - if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + // verify required parameter 'status' is not null or undefined + if (status === null || status === undefined) { + throw new Error('Required parameter status was null or undefined when calling setAutoRepay.'); } + localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); + const config: AxiosRequestConfig = { - method: 'GET', + method: 'POST', params: localVarQueryParameters, headers: localVarHeaderParams, url: localVarPath, }; const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + return this.client.request(config, 'AutoRepaySetting', authSettings); } /** - * Only transferals from and to margin account are provided for now. Time range allows 30 days at most - * @summary List margin account balance change history + * + * @summary Get the max transferable amount for a specific margin currency + * @param currency Retrieve data of the specified currency * @param opts Optional parameters - * @param opts.currency List records related to specified currency only. If specified, `currency_pair` is also required. - * @param opts.currencyPair List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - * @param opts.from Start timestamp of the query - * @param opts.to Time range ending, default to current time - * @param opts.page Page number - * @param opts.limit Maximum number of records to be returned in a single list + * @param opts.currencyPair Currency pair */ - public async listMarginAccountBook(opts: { - currency?: string; - currencyPair?: string; - from?: number; - to?: number; - page?: number; - limit?: number; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/margin/account_book'; + public async getMarginTransferable( + currency: string, + opts: { currencyPair?: string }, + ): Promise<{ response: AxiosResponse; body: MarginTransferable }> { + const localVarPath = this.client.basePath + '/margin/transferable'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -220,29 +273,85 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } - opts = opts || {}; - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + // verify required parameter 'currency' is not null or undefined + if (currency === null || currency === undefined) { + throw new Error('Required parameter currency was null or undefined when calling getMarginTransferable.'); } + opts = opts || {}; + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + if (opts.currencyPair !== undefined) { localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); } - if (opts.from !== undefined) { - localVarQueryParameters['from'] = ObjectSerializer.serialize(opts.from, 'number'); - } + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; - if (opts.to !== undefined) { - localVarQueryParameters['to'] = ObjectSerializer.serialize(opts.to, 'number'); + const authSettings = ['apiv4']; + return this.client.request(config, 'MarginTransferable', authSettings); + } + + /** + * + * @summary List all supported currency pairs supported in margin trading(Deprecated) + */ + public async listMarginCurrencyPairs(): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/currency_pairs'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); } - if (opts.page !== undefined) { - localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = []; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Query one single margin currency pair(Deprecated) + * @param currencyPair Margin currency pair + */ + public async getMarginCurrencyPair( + currencyPair: string, + ): Promise<{ response: AxiosResponse; body: MarginCurrencyPair }> { + const localVarPath = + this.client.basePath + + '/margin/currency_pairs/{currency_pair}'.replace( + '{' + 'currency_pair' + '}', + encodeURIComponent(String(currencyPair)), + ); + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); } - if (opts.limit !== undefined) { - localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + // verify required parameter 'currencyPair' is not null or undefined + if (currencyPair === null || currencyPair === undefined) { + throw new Error( + 'Required parameter currencyPair was null or undefined when calling getMarginCurrencyPair.', + ); } const config: AxiosRequestConfig = { @@ -252,20 +361,17 @@ export class MarginApi { url: localVarPath, }; - const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + const authSettings = []; + return this.client.request(config, 'MarginCurrencyPair', authSettings); } /** * - * @summary Funding account list - * @param opts Optional parameters - * @param opts.currency Retrieve data of the specified currency + * @summary Order book of lending loans(Deprecated) + * @param currency Retrieve data of the specified currency */ - public async listFundingAccounts(opts: { - currency?: string; - }): Promise<{ response: AxiosResponse; body: Array }> { - const localVarPath = this.client.basePath + '/margin/funding_accounts'; + public async listFundingBook(currency: string): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/funding_book'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); const produces = ['application/json']; @@ -276,11 +382,13 @@ export class MarginApi { localVarHeaderParams.Accept = produces.join(','); } - opts = opts || {}; - if (opts.currency !== undefined) { - localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + // verify required parameter 'currency' is not null or undefined + if (currency === null || currency === undefined) { + throw new Error('Required parameter currency was null or undefined when calling listFundingBook.'); } + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, @@ -288,13 +396,13 @@ export class MarginApi { url: localVarPath, }; - const authSettings = ['apiv4']; - return this.client.request>(config, 'Array', authSettings); + const authSettings = []; + return this.client.request>(config, 'Array', authSettings); } /** * - * @summary List all loans + * @summary List all loans(Deprecated) * @param status Loan status * @param side Lend or borrow * @param opts Optional parameters @@ -383,7 +491,7 @@ export class MarginApi { /** * - * @summary Lend or borrow + * @summary Lend or borrow(Deprecated) * @param loan */ public async createLoan(loan: Loan): Promise<{ response: AxiosResponse; body: Loan }> { @@ -417,7 +525,7 @@ export class MarginApi { /** * - * @summary Merge multiple lending loans + * @summary Merge multiple lending loans(Deprecated) * @param currency Retrieve data of the specified currency * @param ids A comma-separated (,) list of IDs of the loans lent. Maximum of 20 IDs are allowed in a request */ @@ -460,7 +568,7 @@ export class MarginApi { /** * - * @summary Retrieve one single loan detail + * @summary Retrieve one single loan detail(Deprecated) * @param loanId Loan ID * @param side Lend or borrow */ @@ -503,7 +611,7 @@ export class MarginApi { /** * Only lent loans can be cancelled - * @summary Cancel lending loan + * @summary Cancel lending loan(Deprecated) * @param loanId Loan ID * @param currency Retrieve data of the specified currency */ @@ -546,7 +654,7 @@ export class MarginApi { /** * Only `auto_renew` modification is supported currently - * @summary Modify a loan + * @summary Modify a loan(Deprecated) * @param loanId Loan ID * @param loanPatch */ @@ -588,7 +696,7 @@ export class MarginApi { /** * - * @summary List loan repayment records + * @summary List loan repayment records(Deprecated) * @param loanId Loan ID */ public async listLoanRepayments(loanId: string): Promise<{ response: AxiosResponse; body: Array }> { @@ -623,7 +731,7 @@ export class MarginApi { /** * - * @summary Repay a loan + * @summary Repay a loan(Deprecated) * @param loanId Loan ID * @param repayRequest */ @@ -668,7 +776,7 @@ export class MarginApi { /** * - * @summary List repayment records of a specific loan + * @summary List repayment records of a specific loan(Deprecated) * @param loanId Loan ID * @param opts Optional parameters * @param opts.status Loan record status @@ -723,7 +831,7 @@ export class MarginApi { /** * - * @summary Get one single loan record + * @summary Get one single loan record(Deprecated) * @param loanRecordId Loan record ID * @param loanId Loan ID */ @@ -772,7 +880,7 @@ export class MarginApi { /** * Only `auto_renew` modification is supported currently - * @summary Modify a loan record + * @summary Modify a loan record(Deprecated) * @param loanRecordId Loan record ID * @param loanPatch */ @@ -820,114 +928,7 @@ export class MarginApi { /** * - * @summary Retrieve user auto repayment setting - */ - public async getAutoRepayStatus(): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { - const localVarPath = this.client.basePath + '/margin/auto_repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'AutoRepaySetting', authSettings); - } - - /** - * - * @summary Update user\'s auto repayment setting - * @param status New auto repayment status. `on` - enabled, `off` - disabled - */ - public async setAutoRepay(status: string): Promise<{ response: AxiosResponse; body: AutoRepaySetting }> { - const localVarPath = this.client.basePath + '/margin/auto_repay'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - // verify required parameter 'status' is not null or undefined - if (status === null || status === undefined) { - throw new Error('Required parameter status was null or undefined when calling setAutoRepay.'); - } - - localVarQueryParameters['status'] = ObjectSerializer.serialize(status, 'string'); - - const config: AxiosRequestConfig = { - method: 'POST', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'AutoRepaySetting', authSettings); - } - - /** - * - * @summary Get the max transferable amount for a specific margin currency - * @param currency Retrieve data of the specified currency - * @param opts Optional parameters - * @param opts.currencyPair Currency pair - */ - public async getMarginTransferable( - currency: string, - opts: { currencyPair?: string }, - ): Promise<{ response: AxiosResponse; body: MarginTransferable }> { - const localVarPath = this.client.basePath + '/margin/transferable'; - const localVarQueryParameters: any = {}; - const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); - const produces = ['application/json']; - // give precedence to 'application/json' - if (produces.indexOf('application/json') >= 0) { - localVarHeaderParams.Accept = 'application/json'; - } else { - localVarHeaderParams.Accept = produces.join(','); - } - - // verify required parameter 'currency' is not null or undefined - if (currency === null || currency === undefined) { - throw new Error('Required parameter currency was null or undefined when calling getMarginTransferable.'); - } - - opts = opts || {}; - localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); - - if (opts.currencyPair !== undefined) { - localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); - } - - const config: AxiosRequestConfig = { - method: 'GET', - params: localVarQueryParameters, - headers: localVarHeaderParams, - url: localVarPath, - }; - - const authSettings = ['apiv4']; - return this.client.request(config, 'MarginTransferable', authSettings); - } - - /** - * - * @summary Get the max borrowable amount for a specific margin currency + * @summary Get the max borrowable amount for a specific margin currency(Deprecated) * @param currency Retrieve data of the specified currency * @param opts Optional parameters * @param opts.currencyPair Currency pair @@ -1362,6 +1363,54 @@ export class MarginApi { return this.client.request>(config, 'Array', authSettings); } + /** + * + * @summary Interest records for the cross margin account + * @param opts Optional parameters + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async getCrossMarginInterestRecords(opts: { + currency?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/cross/interest_records'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + /** * * @summary Get the max transferable amount for a specific cross margin currency diff --git a/api/marginUniApi.ts b/api/marginUniApi.ts new file mode 100644 index 0000000..26afa1c --- /dev/null +++ b/api/marginUniApi.ts @@ -0,0 +1,343 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/* tslint:disable:no-unused-locals */ +import { CreateUniLoan } from '../model/createUniLoan'; +import { MaxUniBorrowable } from '../model/maxUniBorrowable'; +import { UniCurrencyPair } from '../model/uniCurrencyPair'; +import { UniLoan } from '../model/uniLoan'; +import { UniLoanInterestRecord } from '../model/uniLoanInterestRecord'; +import { UniLoanRecord } from '../model/uniLoanRecord'; +import { ObjectSerializer } from '../model/models'; +import { ApiClient } from './apiClient'; +import { AxiosRequestConfig, AxiosResponse } from 'axios'; + +// =============================================== +// This file is autogenerated - Please do not edit +// =============================================== + +export class MarginUniApi { + protected client: ApiClient; + + constructor(client?: ApiClient) { + if (client) { + this.client = client; + } else { + this.client = new ApiClient(); + } + } + + /** + * + * @summary List lending markets + */ + public async listUniCurrencyPairs(): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/uni/currency_pairs'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = []; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Get detail of lending market + * @param currencyPair Currency pair + */ + public async getUniCurrencyPair(currencyPair: string): Promise<{ response: AxiosResponse; body: UniCurrencyPair }> { + const localVarPath = + this.client.basePath + + '/margin/uni/currency_pairs/{currency_pair}'.replace( + '{' + 'currency_pair' + '}', + encodeURIComponent(String(currencyPair)), + ); + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + // verify required parameter 'currencyPair' is not null or undefined + if (currencyPair === null || currencyPair === undefined) { + throw new Error('Required parameter currencyPair was null or undefined when calling getUniCurrencyPair.'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = []; + return this.client.request(config, 'UniCurrencyPair', authSettings); + } + + /** + * + * @summary List loans + * @param opts Optional parameters + * @param opts.currencyPair Currency pair + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async listUniLoans(opts: { + currencyPair?: string; + currency?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/uni/loans'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currencyPair !== undefined) { + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + } + + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Borrow or repay + * @param createUniLoan + */ + public async createUniLoan(createUniLoan: CreateUniLoan): Promise<{ response: AxiosResponse; body?: any }> { + const localVarPath = this.client.basePath + '/margin/uni/loans'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + + // verify required parameter 'createUniLoan' is not null or undefined + if (createUniLoan === null || createUniLoan === undefined) { + throw new Error('Required parameter createUniLoan was null or undefined when calling createUniLoan.'); + } + + const config: AxiosRequestConfig = { + method: 'POST', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + data: ObjectSerializer.serialize(createUniLoan, 'CreateUniLoan'), + }; + + const authSettings = ['apiv4']; + return this.client.request(config, '', authSettings); + } + + /** + * + * @summary Get load records + * @param opts Optional parameters + * @param opts.type type: borrow - borrow, repay - repay + * @param opts.currency Retrieve data of the specified currency + * @param opts.currencyPair Currency pair + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async listUniLoanRecords(opts: { + type?: 'borrow' | 'repay'; + currency?: string; + currencyPair?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/uni/loan_records'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, "'borrow' | 'repay'"); + } + + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.currencyPair !== undefined) { + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary List interest records + * @param opts Optional parameters + * @param opts.currencyPair Currency pair + * @param opts.currency Retrieve data of the specified currency + * @param opts.page Page number + * @param opts.limit Maximum response items. Default: 100, minimum: 1, Maximum: 100 + */ + public async listUniLoanInterestRecords(opts: { + currencyPair?: string; + currency?: string; + page?: number; + limit?: number; + }): Promise<{ response: AxiosResponse; body: Array }> { + const localVarPath = this.client.basePath + '/margin/uni/interest_records'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + opts = opts || {}; + if (opts.currencyPair !== undefined) { + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(opts.currencyPair, 'string'); + } + + if (opts.currency !== undefined) { + localVarQueryParameters['currency'] = ObjectSerializer.serialize(opts.currency, 'string'); + } + + if (opts.page !== undefined) { + localVarQueryParameters['page'] = ObjectSerializer.serialize(opts.page, 'number'); + } + + if (opts.limit !== undefined) { + localVarQueryParameters['limit'] = ObjectSerializer.serialize(opts.limit, 'number'); + } + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request>(config, 'Array', authSettings); + } + + /** + * + * @summary Get maximum borrowable + * @param currency Retrieve data of the specified currency + * @param currencyPair Currency pair + */ + public async getUniBorrowable( + currency: string, + currencyPair: string, + ): Promise<{ response: AxiosResponse; body: MaxUniBorrowable }> { + const localVarPath = this.client.basePath + '/margin/uni/borrowable'; + const localVarQueryParameters: any = {}; + const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); + const produces = ['application/json']; + // give precedence to 'application/json' + if (produces.indexOf('application/json') >= 0) { + localVarHeaderParams.Accept = 'application/json'; + } else { + localVarHeaderParams.Accept = produces.join(','); + } + + // verify required parameter 'currency' is not null or undefined + if (currency === null || currency === undefined) { + throw new Error('Required parameter currency was null or undefined when calling getUniBorrowable.'); + } + + // verify required parameter 'currencyPair' is not null or undefined + if (currencyPair === null || currencyPair === undefined) { + throw new Error('Required parameter currencyPair was null or undefined when calling getUniBorrowable.'); + } + + localVarQueryParameters['currency'] = ObjectSerializer.serialize(currency, 'string'); + + localVarQueryParameters['currency_pair'] = ObjectSerializer.serialize(currencyPair, 'string'); + + const config: AxiosRequestConfig = { + method: 'GET', + params: localVarQueryParameters, + headers: localVarHeaderParams, + url: localVarPath, + }; + + const authSettings = ['apiv4']; + return this.client.request(config, 'MaxUniBorrowable', authSettings); + } +} diff --git a/api/spotApi.ts b/api/spotApi.ts index 3dd85a8..8efc8d0 100644 --- a/api/spotApi.ts +++ b/api/spotApi.ts @@ -718,7 +718,7 @@ export class SpotApi { } /** - * You can place orders with spot, margin or cross margin account through setting the `account `field. It defaults to `spot`, which means spot account is used to place orders. When margin account is used, i.e., `account` is `margin`, `auto_borrow` field can be set to `true` to enable the server to borrow the amount lacked using `POST /margin/loans` when your account\'s balance is not enough. Whether margin orders\' fill will be used to repay margin loans automatically is determined by the auto repayment setting in your **margin account**, which can be updated or queried using `/margin/auto_repay` API. When cross margin account is used, i.e., `account` is `cross_margin`, `auto_borrow` can also be enabled to achieve borrowing the insufficient amount automatically if cross account\'s balance is not enough. But it differs from margin account that automatic repayment is determined by order\'s `auto_repay` field and only current order\'s fill will be used to repay cross margin loans. Automatic repayment will be triggered when the order is finished, i.e., its status is either `cancelled` or `closed`. **Order status** An order waiting to be filled is `open`, and it stays `open` until it is filled totally. If fully filled, order is finished and its status turns to `closed`.If the order is cancelled before it is totally filled, whether or not partially filled, its status is `cancelled`. **Iceberg order** `iceberg` field can be used to set the amount shown. Set to `-1` to hide the order completely. Note that the hidden part\'s fee will be charged using taker\'s fee rate. + * You can place orders with spot, margin or cross margin account through setting the `account `field. It defaults to `spot`, which means spot account is used to place orders. When margin account is used, i.e., `account` is `margin`, `auto_borrow` field can be set to `true` to enable the server to borrow the amount lacked using `POST /margin/loans` when your account\'s balance is not enough. Whether margin orders\' fill will be used to repay margin loans automatically is determined by the auto repayment setting in your **margin account**, which can be updated or queried using `/margin/auto_repay` API. When cross margin account is used, i.e., `account` is `cross_margin`, `auto_borrow` can also be enabled to achieve borrowing the insufficient amount automatically if cross account\'s balance is not enough. But it differs from margin account that automatic repayment is determined by order\'s `auto_repay` field and only current order\'s fill will be used to repay cross margin loans. Automatic repayment will be triggered when the order is finished, i.e., its status is either `cancelled` or `closed`. **Order status** An order waiting to be filled is `open`, and it stays `open` until it is filled totally. If fully filled, order is finished and its status turns to `closed`.If the order is cancelled before it is totally filled, whether or not partially filled, its status is `cancelled`. **Iceberg order** `iceberg` field can be used to set the amount shown. Set to `-1` to hide the order completely. Note that the hidden part\'s fee will be charged using taker\'s fee rate. **Self Trade Prevention** - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body * @summary Create an order * @param order */ diff --git a/api/subAccountApi.ts b/api/subAccountApi.ts index 52a53bd..0b7f865 100644 --- a/api/subAccountApi.ts +++ b/api/subAccountApi.ts @@ -34,8 +34,12 @@ export class SubAccountApi { /** * * @summary List sub-accounts + * @param opts Optional parameters + * @param opts.type `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. */ - public async listSubAccounts(): Promise<{ response: AxiosResponse; body: Array }> { + public async listSubAccounts(opts: { + type?: string; + }): Promise<{ response: AxiosResponse; body: Array }> { const localVarPath = this.client.basePath + '/sub_accounts'; const localVarQueryParameters: any = {}; const localVarHeaderParams: any = (Object).assign({}, this.client.defaultHeaders); @@ -47,6 +51,11 @@ export class SubAccountApi { localVarHeaderParams.Accept = produces.join(','); } + opts = opts || {}; + if (opts.type !== undefined) { + localVarQueryParameters['type'] = ObjectSerializer.serialize(opts.type, 'string'); + } + const config: AxiosRequestConfig = { method: 'GET', params: localVarQueryParameters, diff --git a/docs/AccountApi.md b/docs/AccountApi.md new file mode 100644 index 0000000..2026e99 --- /dev/null +++ b/docs/AccountApi.md @@ -0,0 +1,47 @@ +# AccountApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getAccountDetail**](AccountApi.md#getAccountDetail) | **GET** /account/detail | Get account detail + + +## getAccountDetail + +> Promise<{ response: http.IncomingMessage; body: AccountDetail; }> getAccountDetail() + +Get account detail + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.AccountApi(client); +api.getAccountDetail() + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +Promise<{ response: AxiosResponse; body: AccountDetail; }> [AccountDetail](AccountDetail.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json diff --git a/docs/AccountDetail.md b/docs/AccountDetail.md new file mode 100644 index 0000000..97458c4 --- /dev/null +++ b/docs/AccountDetail.md @@ -0,0 +1,10 @@ +# AccountDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ipWhitelist** | **Array<string>** | IP whitelist | [optional] [default to undefined] +**currencyPairs** | **Array<string>** | CurrencyPair whitelisting | [optional] [default to undefined] +**userId** | **number** | User ID | [optional] [default to undefined] + diff --git a/docs/BatchFuturesOrder.md b/docs/BatchFuturesOrder.md index 91a5841..cfa4ef5 100644 --- a/docs/BatchFuturesOrder.md +++ b/docs/BatchFuturesOrder.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **user** | **number** | User ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation time of order | [optional] [readonly] [default to undefined] **finishTime** | **number** | Order finished time. Not returned if order is open | [optional] [readonly] [default to undefined] -**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close | [optional] [readonly] [default to undefined] +**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] **status** | **string** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] [default to undefined] **contract** | **string** | Futures contract | [optional] [default to undefined] **size** | **number** | Order size. Specify positive number to make a bid, and negative number to ask | [optional] [default to undefined] @@ -30,6 +30,8 @@ Name | Type | Description | Notes **mkfr** | **string** | Maker fee | [optional] [readonly] [default to undefined] **refu** | **number** | Reference user ID | [optional] [readonly] [default to undefined] **autoSize** | **string** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] [default to undefined] +**stpAct** | **string** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] [default to undefined] +**stpId** | **number** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [default to undefined] ## Enum: BatchFuturesOrder.FinishAs @@ -49,6 +51,8 @@ Name | Type | Description | Notes * `ReduceOut` (value: `'reduce_out'`) +* `Stp` (value: `'stp'`) + ## Enum: BatchFuturesOrder.Status @@ -75,3 +79,14 @@ Name | Type | Description | Notes * `Short` (value: `'close_short'`) +## Enum: BatchFuturesOrder.StpAct + +* `Co` (value: `'co'`) + +* `Cn` (value: `'cn'`) + +* `Cb` (value: `'cb'`) + +* `Minus` (value: `'-'`) + + diff --git a/docs/BatchOrder.md b/docs/BatchOrder.md index fe03b47..929d831 100644 --- a/docs/BatchOrder.md +++ b/docs/BatchOrder.md @@ -34,6 +34,9 @@ Name | Type | Description | Notes **gtDiscount** | **boolean** | Whether GT fee discount is used | [optional] [readonly] [default to undefined] **rebatedFee** | **string** | Rebated fee | [optional] [readonly] [default to undefined] **rebatedFeeCurrency** | **string** | Rebated fee currency unit | [optional] [readonly] [default to undefined] +**stpId** | **number** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [default to undefined] +**stpAct** | **string** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] [default to undefined] +**finishAs** | **string** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] ## Enum: BatchOrder.Status @@ -78,3 +81,27 @@ Name | Type | Description | Notes * `Fok` (value: `'fok'`) +## Enum: BatchOrder.StpAct + +* `Cn` (value: `'cn'`) + +* `Co` (value: `'co'`) + +* `Cb` (value: `'cb'`) + +* `Minus` (value: `'-'`) + + +## Enum: BatchOrder.FinishAs + +* `Open` (value: `'open'`) + +* `Filled` (value: `'filled'`) + +* `Cancelled` (value: `'cancelled'`) + +* `Ioc` (value: `'ioc'`) + +* `Stp` (value: `'stp'`) + + diff --git a/docs/Contract.md b/docs/Contract.md index 226554d..d389189 100644 --- a/docs/Contract.md +++ b/docs/Contract.md @@ -38,6 +38,7 @@ Name | Type | Description | Notes **ordersLimit** | **number** | Maximum number of open orders | [optional] [default to undefined] **enableBonus** | **boolean** | Whether bouns is enabled | [optional] [default to undefined] **enableCredit** | **boolean** | Whether portfolio margin account is enabled | [optional] [default to undefined] +**createTime** | **number** | Created time of the contract | [optional] [default to undefined] ## Enum: Contract.Type diff --git a/docs/CreateUniLend.md b/docs/CreateUniLend.md new file mode 100644 index 0000000..2c00e1c --- /dev/null +++ b/docs/CreateUniLend.md @@ -0,0 +1,18 @@ +# CreateUniLend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency name | [default to undefined] +**amount** | **string** | The amount of currency could be lent | [default to undefined] +**type** | **string** | type: lend - lend, redeem - redeem | [default to undefined] +**minRate** | **string** | The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. | [optional] [default to undefined] + +## Enum: CreateUniLend.Type + +* `Lend` (value: `'lend'`) + +* `Redeem` (value: `'redeem'`) + + diff --git a/docs/CreateUniLoan.md b/docs/CreateUniLoan.md new file mode 100644 index 0000000..096a1ad --- /dev/null +++ b/docs/CreateUniLoan.md @@ -0,0 +1,19 @@ +# CreateUniLoan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency | [default to undefined] +**type** | **string** | type: borrow - borrow, repay - repay | [default to undefined] +**amount** | **string** | The amount of lending or repaying | [default to undefined] +**repaidAll** | **boolean** | Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. | [optional] [default to undefined] +**currencyPair** | **string** | Currency pair | [default to undefined] + +## Enum: CreateUniLoan.Type + +* `Borrow` (value: `'borrow'`) + +* `Repay` (value: `'repay'`) + + diff --git a/docs/CrossMarginAccount.md b/docs/CrossMarginAccount.md index 05366ff..4b7024d 100644 --- a/docs/CrossMarginAccount.md +++ b/docs/CrossMarginAccount.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID | [optional] [default to undefined] +**refreshTime** | **number** | Time of the most recent refresh | [optional] [default to undefined] **locked** | **boolean** | Whether account is locked | [optional] [default to undefined] **balances** | [**{ [key: string]: CrossMarginBalance; }**](CrossMarginBalance.md) | | [optional] [default to undefined] **total** | **string** | Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` | [optional] [default to undefined] @@ -12,10 +13,12 @@ Name | Type | Description | Notes **interest** | **string** | Total unpaid interests in USDT, i.e., the sum of all currencies\' `interest*price*discount` | [optional] [default to undefined] **risk** | **string** | Risk rate. When it belows 110%, liquidation will be triggered. Calculation formula: `total / (borrowed+interest)` | [optional] [default to undefined] **totalInitialMargin** | **string** | Total initial margin | [optional] [default to undefined] -**totalMarginBalance** | **string** | Total margin balance | [optional] [default to undefined] +**totalMarginBalance** | **string** | Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) | [optional] [default to undefined] **totalMaintenanceMargin** | **string** | Total maintenance margin | [optional] [default to undefined] **totalInitialMarginRate** | **string** | Total initial margin rate | [optional] [default to undefined] **totalMaintenanceMarginRate** | **string** | Total maintenance margin rate | [optional] [default to undefined] **totalAvailableMargin** | **string** | Total available margin | [optional] [default to undefined] **portfolioMarginTotal** | **string** | Total amount of the portfolio margin account | [optional] [default to undefined] +**portfolioMarginTotalLiab** | **string** | Total liabilities of the portfolio margin account | [optional] [default to undefined] +**portfolioMarginTotalEquity** | **string** | Total equity of the portfolio margin account | [optional] [default to undefined] diff --git a/docs/CrossMarginAccountBook.md b/docs/CrossMarginAccountBook.md index 67c01c4..495775a 100644 --- a/docs/CrossMarginAccountBook.md +++ b/docs/CrossMarginAccountBook.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **currency** | **string** | Currency changed | [optional] [default to undefined] **change** | **string** | Amount changed. Positive value means transferring in, while negative out | [optional] [default to undefined] **balance** | **string** | Balance after change | [optional] [default to undefined] -**type** | **string** | Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - unknown: unknown type | [optional] [default to undefined] +**type** | **string** | Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - futures_in: transfer into futures account - futures_out: transfer out of futures account - unknown: unknown type | [optional] [default to undefined] ## Enum: CrossMarginAccountBook.Type @@ -31,6 +31,10 @@ Name | Type | Description | Notes * `OrderFee` (value: `'order_fee'`) +* `FuturesIn` (value: `'futures_in'`) + +* `FuturesOut` (value: `'futures_out'`) + * `Unknown` (value: `'unknown'`) diff --git a/docs/CrossMarginBalance.md b/docs/CrossMarginBalance.md index 154eb3d..82d0571 100644 --- a/docs/CrossMarginBalance.md +++ b/docs/CrossMarginBalance.md @@ -8,4 +8,9 @@ Name | Type | Description | Notes **freeze** | **string** | Locked amount | [optional] [default to undefined] **borrowed** | **string** | Borrowed amount | [optional] [default to undefined] **interest** | **string** | Unpaid interests | [optional] [default to undefined] +**negativeLiab** | **string** | Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] | [optional] [default to undefined] +**futuresPosLiab** | **string** | Borrowing to Open Positions in Futures | [optional] [default to undefined] +**equity** | **string** | Equity. Formula: available + freeze - borrowed + total + unrealized_pnl | [optional] [default to undefined] +**totalFreeze** | **string** | Total freeze. Formula: position_initial_margin + order_margin | [optional] [default to undefined] +**totalLiab** | **string** | Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab | [optional] [default to undefined] diff --git a/docs/CrossMarginBalance1.md b/docs/CrossMarginBalance1.md new file mode 100644 index 0000000..2a4e139 --- /dev/null +++ b/docs/CrossMarginBalance1.md @@ -0,0 +1,11 @@ +# CrossMarginBalance1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**available** | **string** | Available amount | [optional] [default to undefined] +**freeze** | **string** | Locked amount | [optional] [default to undefined] +**borrowed** | **string** | Borrowed amount | [optional] [default to undefined] +**interest** | **string** | Unpaid interests | [optional] [default to undefined] + diff --git a/docs/CrossMarginLoan.md b/docs/CrossMarginLoan.md index 2de94de..769791d 100644 --- a/docs/CrossMarginLoan.md +++ b/docs/CrossMarginLoan.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **string** | Borrow loan ID | [optional] [readonly] [default to undefined] +**id** | **string** | Loan record ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation timestamp, in milliseconds | [optional] [readonly] [default to undefined] **updateTime** | **number** | Update timestamp, in milliseconds | [optional] [readonly] [default to undefined] **currency** | **string** | Currency name | [default to undefined] diff --git a/docs/CrossMarginRepayment.md b/docs/CrossMarginRepayment.md index 5ef5145..4c34cc2 100644 --- a/docs/CrossMarginRepayment.md +++ b/docs/CrossMarginRepayment.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Loan record ID | [optional] [default to undefined] **createTime** | **number** | Repayment time | [optional] [default to undefined] -**loanId** | **string** | Borrow loan ID | [optional] [default to undefined] +**loanId** | **string** | Loan record ID | [optional] [default to undefined] **currency** | **string** | Currency name | [optional] [default to undefined] **principal** | **string** | Repaid principal | [optional] [default to undefined] **interest** | **string** | Repaid interest | [optional] [default to undefined] diff --git a/docs/EarnUniApi.md b/docs/EarnUniApi.md new file mode 100644 index 0000000..9f7de8a --- /dev/null +++ b/docs/EarnUniApi.md @@ -0,0 +1,375 @@ +# EarnUniApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listUniCurrencies**](EarnUniApi.md#listUniCurrencies) | **GET** /earn/uni/currencies | List currencies for lending +[**getUniCurrency**](EarnUniApi.md#getUniCurrency) | **GET** /earn/uni/currencies/{currency} | Get currency detail for lending +[**listUserUniLends**](EarnUniApi.md#listUserUniLends) | **GET** /earn/uni/lends | List user\'s lending orders +[**createUniLend**](EarnUniApi.md#createUniLend) | **POST** /earn/uni/lends | Lend or redeem +[**changeUniLend**](EarnUniApi.md#changeUniLend) | **PATCH** /earn/uni/lends | Amend lending order +[**listUniLendRecords**](EarnUniApi.md#listUniLendRecords) | **GET** /earn/uni/lend_records | List records of lending +[**getUniInterest**](EarnUniApi.md#getUniInterest) | **GET** /earn/uni/interests/{currency} | Get the user\'s total interest income of specified currency +[**listUniInterestRecords**](EarnUniApi.md#listUniInterestRecords) | **GET** /earn/uni/interest_records | List interest records + + +## listUniCurrencies + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniCurrencies() + +List currencies for lending + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.EarnUniApi(client); +api.listUniCurrencies() + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniCurrency](UniCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## getUniCurrency + +> Promise<{ response: http.IncomingMessage; body: UniCurrency; }> getUniCurrency(currency) + +Get currency detail for lending + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.EarnUniApi(client); +const currency = "btc"; // string | Currency +api.getUniCurrency(currency) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Currency | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: UniCurrency; }> [UniCurrency](UniCurrency.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## listUserUniLends + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUserUniLends(opts) + +List user\'s lending orders + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const opts = { + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.listUserUniLends(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLend](UniLend.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## createUniLend + +> Promise<{ response: http.IncomingMessage; body?: any; }> createUniLend(createUniLend) + +Lend or redeem + +`Lending`: The minimum interest rate is required in lending. The lending result is updated hourly and the interest profit is paid on the next hour. A high interest rate might lead to unsuccessful lending and no profit will be gained for that hour. If the funds are redeemed before the hourly settlement, no interest can be obtained for that hour. About priority: the orders created or amended first under the same interest rate will be lent out first `Redemption`: Funds that failed to be lent can be redeemed immediately. For the successfully lent funds, enjoy the hourly income, and the redemption will arrive at the next hour `Note`: Two minutes before and after the hour is the settlement time, lending and redemption are prohibited. + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const createUniLend = new CreateUniLend(); // CreateUniLend | +api.createUniLend(createUniLend) + .then(value => console.log('API called successfully.'), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUniLend** | [**CreateUniLend**](CreateUniLend.md)| | + +### Return type + +Promise<{ response: AxiosResponse; body?: any; }> + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +## changeUniLend + +> Promise<{ response: http.IncomingMessage; body?: any; }> changeUniLend(patchUniLend) + +Amend lending order + +Currently only supports amending the minimum interest rate (hour) + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const patchUniLend = new PatchUniLend(); // PatchUniLend | +api.changeUniLend(patchUniLend) + .then(value => console.log('API called successfully.'), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **patchUniLend** | [**PatchUniLend**](PatchUniLend.md)| | + +### Return type + +Promise<{ response: AxiosResponse; body?: any; }> + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +## listUniLendRecords + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniLendRecords(opts) + +List records of lending + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const opts = { + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100, // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 + 'type': "lend" // 'lend' | 'redeem' | type: lend - lend, redeem - redeem +}; +api.listUniLendRecords(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + **type** | **Type**| type: lend - lend, redeem - redeem | [optional] [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLendRecord](UniLendRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## getUniInterest + +> Promise<{ response: http.IncomingMessage; body: UniLendInterest; }> getUniInterest(currency) + +Get the user\'s total interest income of specified currency + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const currency = "btc"; // string | Currency +api.getUniInterest(currency) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Currency | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: UniLendInterest; }> [UniLendInterest](UniLendInterest.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## listUniInterestRecords + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniInterestRecords(opts) + +List interest records + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.EarnUniApi(client); +const opts = { + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.listUniInterestRecords(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniInterestRecord](UniInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json diff --git a/docs/FlashSwapApi.md b/docs/FlashSwapApi.md index db64466..b7990a9 100644 --- a/docs/FlashSwapApi.md +++ b/docs/FlashSwapApi.md @@ -193,7 +193,7 @@ Promise<{ response: AxiosResponse; body: FlashSwapOrder; }> [FlashSwapOrder](Fla ## previewFlashSwapOrder -> Promise<{ response: http.IncomingMessage; body: FlashSwapOrderPreview; }> previewFlashSwapOrder(flashSwapOrderRequest) +> Promise<{ response: http.IncomingMessage; body: FlashSwapOrderPreview; }> previewFlashSwapOrder(flashSwapPreviewRequest) Initiate a flash swap order preview @@ -208,8 +208,8 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.FlashSwapApi(client); -const flashSwapOrderRequest = new FlashSwapOrderRequest(); // FlashSwapOrderRequest | -api.previewFlashSwapOrder(flashSwapOrderRequest) +const flashSwapPreviewRequest = new FlashSwapPreviewRequest(); // FlashSwapPreviewRequest | +api.previewFlashSwapOrder(flashSwapPreviewRequest) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -219,7 +219,7 @@ api.previewFlashSwapOrder(flashSwapOrderRequest) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **flashSwapOrderRequest** | [**FlashSwapOrderRequest**](FlashSwapOrderRequest.md)| | + **flashSwapPreviewRequest** | [**FlashSwapPreviewRequest**](FlashSwapPreviewRequest.md)| | ### Return type diff --git a/docs/FlashSwapOrderRequest.md b/docs/FlashSwapOrderRequest.md index df2d14c..a2d6528 100644 --- a/docs/FlashSwapOrderRequest.md +++ b/docs/FlashSwapOrderRequest.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**previewId** | **string** | Preview result ID | [optional] [default to undefined] +**previewId** | **string** | Preview result ID | [default to undefined] **sellCurrency** | **string** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [default to undefined] -**sellAmount** | **string** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] [default to undefined] +**sellAmount** | **string** | Amount to sell (based on the preview result) | [default to undefined] **buyCurrency** | **string** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [default to undefined] -**buyAmount** | **string** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] [default to undefined] +**buyAmount** | **string** | Amount to buy (based on the preview result) | [default to undefined] diff --git a/docs/FlashSwapPreviewRequest.md b/docs/FlashSwapPreviewRequest.md new file mode 100644 index 0000000..68f92c4 --- /dev/null +++ b/docs/FlashSwapPreviewRequest.md @@ -0,0 +1,11 @@ +# FlashSwapPreviewRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sellCurrency** | **string** | Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [default to undefined] +**sellAmount** | **string** | Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] [default to undefined] +**buyCurrency** | **string** | Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` | [default to undefined] +**buyAmount** | **string** | Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` | [optional] [default to undefined] + diff --git a/docs/FuturesApi.md b/docs/FuturesApi.md index 284a81e..0607214 100644 --- a/docs/FuturesApi.md +++ b/docs/FuturesApi.md @@ -1265,7 +1265,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [FuturesOrder]( Create a futures order -- Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 +- Creating futures orders requires `size`, which is number of contracts instead of currency amount. You can use `quanto_multiplier` in contract detail response to know how much currency 1 size contract represents - Zero-filled order cannot be retrieved 10 minutes after order cancellation. You will get a 404 not found for such orders - Set `reduce_only` to `true` can keep the position from changing side when reducing position size - In single position mode, to close a position, you need to set `size` to 0 and `close` to `true` - In dual position mode, to close one side position, you need to set `auto_size` side, `reduce_only` to true and `size` to 0 - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body ### Example @@ -1566,7 +1566,7 @@ const opts = { 'order': 12345, // number | Futures order ID, return related data only if specified 'limit': 100, // number | Maximum number of records to be returned in a single list 'offset': 0, // number | List offset, starting from 0 - 'lastId': "12345" // string | Specify list staring point using the `id` of last record in previous list-query results + 'lastId': "12345" // string | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using \'GET /futures/{settle}/my_trades_timerange\'. }; api.getMyTrades(settle, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), @@ -1583,7 +1583,7 @@ Name | Type | Description | Notes **order** | **number**| Futures order ID, return related data only if specified | [optional] [default to undefined] **limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100] **offset** | **number**| List offset, starting from 0 | [optional] [default to 0] - **lastId** | **string**| Specify list staring point using the `id` of last record in previous list-query results | [optional] [default to undefined] + **lastId** | **string**| Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. If you need to iterate through and retrieve more records, we recommend using \'GET /futures/{settle}/my_trades_timerange\'. | [optional] [default to undefined] ### Return type @@ -1600,7 +1600,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [MyFuturesTra ## getMyTradesWithTimeRange -> Promise<{ response: http.IncomingMessage; body: Array; }> getMyTradesWithTimeRange(settle, opts) +> Promise<{ response: http.IncomingMessage; body: Array; }> getMyTradesWithTimeRange(settle, opts) List personal trading history by time range @@ -1642,7 +1642,7 @@ Name | Type | Description | Notes ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [MyFuturesTrade](MyFuturesTrade.md) +Promise<{ response: AxiosResponse; body: Array; }> [MyFuturesTradeTimeRange](MyFuturesTradeTimeRange.md) ### Authorization diff --git a/docs/FuturesOrder.md b/docs/FuturesOrder.md index 461f556..54409f4 100644 --- a/docs/FuturesOrder.md +++ b/docs/FuturesOrder.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **user** | **number** | User ID | [optional] [readonly] [default to undefined] **createTime** | **number** | Creation time of order | [optional] [readonly] [default to undefined] **finishTime** | **number** | Order finished time. Not returned if order is open | [optional] [readonly] [default to undefined] -**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close | [optional] [readonly] [default to undefined] +**finishAs** | **string** | How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] **status** | **string** | Order status - `open`: waiting to be traded - `finished`: finished | [optional] [readonly] [default to undefined] **contract** | **string** | Futures contract | [default to undefined] **size** | **number** | Order size. Specify positive number to make a bid, and negative number to ask | [default to undefined] @@ -27,6 +27,9 @@ Name | Type | Description | Notes **mkfr** | **string** | Maker fee | [optional] [readonly] [default to undefined] **refu** | **number** | Reference user ID | [optional] [readonly] [default to undefined] **autoSize** | **string** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional] [default to undefined] +**stpId** | **number** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [default to undefined] +**stpAct** | **string** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] [default to undefined] +**amendText** | **string** | The custom data that the user remarked when amending the order | [optional] [readonly] [default to undefined] ## Enum: FuturesOrder.FinishAs @@ -46,6 +49,8 @@ Name | Type | Description | Notes * `ReduceOut` (value: `'reduce_out'`) +* `Stp` (value: `'stp'`) + ## Enum: FuturesOrder.Status @@ -72,3 +77,14 @@ Name | Type | Description | Notes * `Short` (value: `'close_short'`) +## Enum: FuturesOrder.StpAct + +* `Co` (value: `'co'`) + +* `Cn` (value: `'cn'`) + +* `Cb` (value: `'cb'`) + +* `Minus` (value: `'-'`) + + diff --git a/docs/FuturesOrderAmendment.md b/docs/FuturesOrderAmendment.md index cef4ce8..8eae25d 100644 --- a/docs/FuturesOrderAmendment.md +++ b/docs/FuturesOrderAmendment.md @@ -6,4 +6,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **size** | **number** | New order size, including filled part. - If new size is less than or equal to filled size, the order will be cancelled. - Order side must be identical to the original one. - Close order size cannot be changed. - For reduce only orders, increasing size may leads to other reduce only orders being cancelled. - If price is not changed, decreasing size will not change its precedence in order book, while increasing will move it to the last at current price. | [optional] [default to undefined] **price** | **string** | New order price. | [optional] [default to undefined] +**amendText** | **string** | Custom info during amending order | [optional] [default to undefined] diff --git a/docs/FuturesTicker.md b/docs/FuturesTicker.md index c671153..b0704fb 100644 --- a/docs/FuturesTicker.md +++ b/docs/FuturesTicker.md @@ -23,4 +23,6 @@ Name | Type | Description | Notes **quantoBaseRate** | **string** | Exchange rate of base currency and settlement currency in Quanto contract. Does not exists in contracts of other types | [optional] [default to undefined] **basisRate** | **string** | Basis rate | [optional] [default to undefined] **basisValue** | **string** | Basis value | [optional] [default to undefined] +**lowestAsk** | **string** | Recent lowest ask | [optional] [default to undefined] +**highestBid** | **string** | Recent highest bid | [optional] [default to undefined] diff --git a/docs/MarginApi.md b/docs/MarginApi.md index bbce7bc..6511887 100644 --- a/docs/MarginApi.md +++ b/docs/MarginApi.md @@ -4,27 +4,27 @@ All URIs are relative to *https://api.gateio.ws/api/v4* Method | HTTP request | Description ------------- | ------------- | ------------- -[**listMarginCurrencyPairs**](MarginApi.md#listMarginCurrencyPairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading -[**getMarginCurrencyPair**](MarginApi.md#getMarginCurrencyPair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair -[**listFundingBook**](MarginApi.md#listFundingBook) | **GET** /margin/funding_book | Order book of lending loans [**listMarginAccounts**](MarginApi.md#listMarginAccounts) | **GET** /margin/accounts | Margin account list [**listMarginAccountBook**](MarginApi.md#listMarginAccountBook) | **GET** /margin/account_book | List margin account balance change history [**listFundingAccounts**](MarginApi.md#listFundingAccounts) | **GET** /margin/funding_accounts | Funding account list -[**listLoans**](MarginApi.md#listLoans) | **GET** /margin/loans | List all loans -[**createLoan**](MarginApi.md#createLoan) | **POST** /margin/loans | Lend or borrow -[**mergeLoans**](MarginApi.md#mergeLoans) | **POST** /margin/merged_loans | Merge multiple lending loans -[**getLoan**](MarginApi.md#getLoan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail -[**cancelLoan**](MarginApi.md#cancelLoan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan -[**updateLoan**](MarginApi.md#updateLoan) | **PATCH** /margin/loans/{loan_id} | Modify a loan -[**listLoanRepayments**](MarginApi.md#listLoanRepayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records -[**repayLoan**](MarginApi.md#repayLoan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan -[**listLoanRecords**](MarginApi.md#listLoanRecords) | **GET** /margin/loan_records | List repayment records of a specific loan -[**getLoanRecord**](MarginApi.md#getLoanRecord) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record -[**updateLoanRecord**](MarginApi.md#updateLoanRecord) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record [**getAutoRepayStatus**](MarginApi.md#getAutoRepayStatus) | **GET** /margin/auto_repay | Retrieve user auto repayment setting [**setAutoRepay**](MarginApi.md#setAutoRepay) | **POST** /margin/auto_repay | Update user\'s auto repayment setting [**getMarginTransferable**](MarginApi.md#getMarginTransferable) | **GET** /margin/transferable | Get the max transferable amount for a specific margin currency -[**getMarginBorrowable**](MarginApi.md#getMarginBorrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency +[**listMarginCurrencyPairs**](MarginApi.md#listMarginCurrencyPairs) | **GET** /margin/currency_pairs | List all supported currency pairs supported in margin trading(Deprecated) +[**getMarginCurrencyPair**](MarginApi.md#getMarginCurrencyPair) | **GET** /margin/currency_pairs/{currency_pair} | Query one single margin currency pair(Deprecated) +[**listFundingBook**](MarginApi.md#listFundingBook) | **GET** /margin/funding_book | Order book of lending loans(Deprecated) +[**listLoans**](MarginApi.md#listLoans) | **GET** /margin/loans | List all loans(Deprecated) +[**createLoan**](MarginApi.md#createLoan) | **POST** /margin/loans | Lend or borrow(Deprecated) +[**mergeLoans**](MarginApi.md#mergeLoans) | **POST** /margin/merged_loans | Merge multiple lending loans(Deprecated) +[**getLoan**](MarginApi.md#getLoan) | **GET** /margin/loans/{loan_id} | Retrieve one single loan detail(Deprecated) +[**cancelLoan**](MarginApi.md#cancelLoan) | **DELETE** /margin/loans/{loan_id} | Cancel lending loan(Deprecated) +[**updateLoan**](MarginApi.md#updateLoan) | **PATCH** /margin/loans/{loan_id} | Modify a loan(Deprecated) +[**listLoanRepayments**](MarginApi.md#listLoanRepayments) | **GET** /margin/loans/{loan_id}/repayment | List loan repayment records(Deprecated) +[**repayLoan**](MarginApi.md#repayLoan) | **POST** /margin/loans/{loan_id}/repayment | Repay a loan(Deprecated) +[**listLoanRecords**](MarginApi.md#listLoanRecords) | **GET** /margin/loan_records | List repayment records of a specific loan(Deprecated) +[**getLoanRecord**](MarginApi.md#getLoanRecord) | **GET** /margin/loan_records/{loan_record_id} | Get one single loan record(Deprecated) +[**updateLoanRecord**](MarginApi.md#updateLoanRecord) | **PATCH** /margin/loan_records/{loan_record_id} | Modify a loan record(Deprecated) +[**getMarginBorrowable**](MarginApi.md#getMarginBorrowable) | **GET** /margin/borrowable | Get the max borrowable amount for a specific margin currency(Deprecated) [**listCrossMarginCurrencies**](MarginApi.md#listCrossMarginCurrencies) | **GET** /margin/cross/currencies | Currencies supported by cross margin. [**getCrossMarginCurrency**](MarginApi.md#getCrossMarginCurrency) | **GET** /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin [**getCrossMarginAccount**](MarginApi.md#getCrossMarginAccount) | **GET** /margin/cross/accounts | Retrieve cross margin account @@ -34,15 +34,16 @@ Method | HTTP request | Description [**getCrossMarginLoan**](MarginApi.md#getCrossMarginLoan) | **GET** /margin/cross/loans/{loan_id} | Retrieve single borrow loan detail [**listCrossMarginRepayments**](MarginApi.md#listCrossMarginRepayments) | **GET** /margin/cross/repayments | Retrieve cross margin repayments [**repayCrossMarginLoan**](MarginApi.md#repayCrossMarginLoan) | **POST** /margin/cross/repayments | Cross margin repayments +[**getCrossMarginInterestRecords**](MarginApi.md#getCrossMarginInterestRecords) | **GET** /margin/cross/interest_records | Interest records for the cross margin account [**getCrossMarginTransferable**](MarginApi.md#getCrossMarginTransferable) | **GET** /margin/cross/transferable | Get the max transferable amount for a specific cross margin currency [**getCrossMarginBorrowable**](MarginApi.md#getCrossMarginBorrowable) | **GET** /margin/cross/borrowable | Get the max borrowable amount for a specific cross margin currency -## listMarginCurrencyPairs +## listMarginAccounts -> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginCurrencyPairs() +> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginAccounts(opts) -List all supported currency pairs supported in margin trading +Margin account list ### Example @@ -51,35 +52,45 @@ const GateApi = require('gate-api'); const client = new GateApi.ApiClient(); // uncomment the next line to change base path // client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); -api.listMarginCurrencyPairs() +const opts = { + 'currencyPair': "BTC_USDT" // string | Currency pair +}; +api.listMarginAccounts(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencyPair** | **string**| Currency pair | [optional] [default to undefined] ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [MarginCurrencyPair](MarginCurrencyPair.md) +Promise<{ response: AxiosResponse; body: Array; }> [MarginAccount](MarginAccount.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json -## getMarginCurrencyPair +## listMarginAccountBook -> Promise<{ response: http.IncomingMessage; body: MarginCurrencyPair; }> getMarginCurrencyPair(currencyPair) +> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginAccountBook(opts) -Query one single margin currency pair +List margin account balance change history + +Only transferals from and to margin account are provided for now. Time range allows 30 days at most ### Example @@ -88,10 +99,19 @@ const GateApi = require('gate-api'); const client = new GateApi.ApiClient(); // uncomment the next line to change base path // client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); -const currencyPair = "BTC_USDT"; // string | Margin currency pair -api.getMarginCurrencyPair(currencyPair) +const opts = { + 'currency': "currency_example", // string | List records related to specified currency only. If specified, `currency_pair` is also required. + 'currencyPair': "currencyPair_example", // string | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided + 'from': 1627706330, // number | Start timestamp of the query + 'to': 1635329650, // number | Time range ending, default to current time + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum number of records to be returned in a single list +}; +api.listMarginAccountBook(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -101,26 +121,31 @@ api.getMarginCurrencyPair(currencyPair) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currencyPair** | **string**| Margin currency pair | [default to undefined] + **currency** | **string**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] [default to undefined] + **currencyPair** | **string**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] [default to undefined] + **from** | **number**| Start timestamp of the query | [optional] [default to undefined] + **to** | **number**| Time range ending, default to current time | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100] ### Return type -Promise<{ response: AxiosResponse; body: MarginCurrencyPair; }> [MarginCurrencyPair](MarginCurrencyPair.md) +Promise<{ response: AxiosResponse; body: Array; }> [MarginAccountBook](MarginAccountBook.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json -## listFundingBook +## listFundingAccounts -> Promise<{ response: http.IncomingMessage; body: Array; }> listFundingBook(currency) +> Promise<{ response: http.IncomingMessage; body: Array; }> listFundingAccounts(opts) -Order book of lending loans +Funding account list ### Example @@ -129,10 +154,14 @@ const GateApi = require('gate-api'); const client = new GateApi.ApiClient(); // uncomment the next line to change base path // client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); -const currency = "BTC"; // string | Retrieve data of the specified currency -api.listFundingBook(currency) +const opts = { + 'currency': "BTC" // string | Retrieve data of the specified currency +}; +api.listFundingAccounts(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -142,26 +171,26 @@ api.listFundingBook(currency) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [default to undefined] + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [FundingBookItem](FundingBookItem.md) +Promise<{ response: AxiosResponse; body: Array; }> [FundingAccount](FundingAccount.md) ### Authorization -No authorization required +[apiv4](../README.md#apiv4) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json -## listMarginAccounts +## getAutoRepayStatus -> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginAccounts(opts) +> Promise<{ response: http.IncomingMessage; body: AutoRepaySetting; }> getAutoRepayStatus() -Margin account list +Retrieve user auto repayment setting ### Example @@ -174,24 +203,18 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); -const opts = { - 'currencyPair': "BTC_USDT" // string | Currency pair -}; -api.listMarginAccounts(opts) +api.getAutoRepayStatus() .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currencyPair** | **string**| Currency pair | [optional] [default to undefined] +This endpoint does not need any parameter. ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [MarginAccount](MarginAccount.md) +Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> [AutoRepaySetting](AutoRepaySetting.md) ### Authorization @@ -202,13 +225,11 @@ Promise<{ response: AxiosResponse; body: Array; }> [MarginAccount - **Content-Type**: Not defined - **Accept**: application/json -## listMarginAccountBook - -> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginAccountBook(opts) +## setAutoRepay -List margin account balance change history +> Promise<{ response: http.IncomingMessage; body: AutoRepaySetting; }> setAutoRepay(status) -Only transferals from and to margin account are provided for now. Time range allows 30 days at most +Update user\'s auto repayment setting ### Example @@ -221,15 +242,8 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); -const opts = { - 'currency': "currency_example", // string | List records related to specified currency only. If specified, `currency_pair` is also required. - 'currencyPair': "currencyPair_example", // string | List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided - 'from': 1627706330, // number | Start timestamp of the query - 'to': 1635329650, // number | Time range ending, default to current time - 'page': 1, // number | Page number - 'limit': 100 // number | Maximum number of records to be returned in a single list -}; -api.listMarginAccountBook(opts) +const status = "on"; // string | New auto repayment status. `on` - enabled, `off` - disabled +api.setAutoRepay(status) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -239,16 +253,11 @@ api.listMarginAccountBook(opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **string**| List records related to specified currency only. If specified, `currency_pair` is also required. | [optional] [default to undefined] - **currencyPair** | **string**| List records related to specified currency pair. Used in combination with `currency`. Ignored if `currency` is not provided | [optional] [default to undefined] - **from** | **number**| Start timestamp of the query | [optional] [default to undefined] - **to** | **number**| Time range ending, default to current time | [optional] [default to undefined] - **page** | **number**| Page number | [optional] [default to 1] - **limit** | **number**| Maximum number of records to be returned in a single list | [optional] [default to 100] + **status** | **string**| New auto repayment status. `on` - enabled, `off` - disabled | [default to undefined] ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [MarginAccountBook](MarginAccountBook.md) +Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> [AutoRepaySetting](AutoRepaySetting.md) ### Authorization @@ -259,11 +268,11 @@ Promise<{ response: AxiosResponse; body: Array; }> [MarginAcc - **Content-Type**: Not defined - **Accept**: application/json -## listFundingAccounts +## getMarginTransferable -> Promise<{ response: http.IncomingMessage; body: Array; }> listFundingAccounts(opts) +> Promise<{ response: http.IncomingMessage; body: MarginTransferable; }> getMarginTransferable(currency, opts) -Funding account list +Get the max transferable amount for a specific margin currency ### Example @@ -276,10 +285,11 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.MarginApi(client); +const currency = "BTC"; // string | Retrieve data of the specified currency const opts = { - 'currency': "BTC" // string | Retrieve data of the specified currency + 'currencyPair': "BTC_USDT" // string | Currency pair }; -api.listFundingAccounts(opts) +api.getMarginTransferable(currency, opts) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` @@ -289,11 +299,12 @@ api.listFundingAccounts(opts) Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **currency** | **string**| Retrieve data of the specified currency | [default to undefined] + **currencyPair** | **string**| Currency pair | [optional] [default to undefined] ### Return type -Promise<{ response: AxiosResponse; body: Array; }> [FundingAccount](FundingAccount.md) +Promise<{ response: AxiosResponse; body: MarginTransferable; }> [MarginTransferable](MarginTransferable.md) ### Authorization @@ -304,11 +315,130 @@ Promise<{ response: AxiosResponse; body: Array; }> [FundingAccou - **Content-Type**: Not defined - **Accept**: application/json +## listMarginCurrencyPairs + +> Promise<{ response: http.IncomingMessage; body: Array; }> listMarginCurrencyPairs() + +List all supported currency pairs supported in margin trading(Deprecated) + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.MarginApi(client); +api.listMarginCurrencyPairs() + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [MarginCurrencyPair](MarginCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## getMarginCurrencyPair + +> Promise<{ response: http.IncomingMessage; body: MarginCurrencyPair; }> getMarginCurrencyPair(currencyPair) + +Query one single margin currency pair(Deprecated) + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.MarginApi(client); +const currencyPair = "BTC_USDT"; // string | Margin currency pair +api.getMarginCurrencyPair(currencyPair) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencyPair** | **string**| Margin currency pair | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: MarginCurrencyPair; }> [MarginCurrencyPair](MarginCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## listFundingBook + +> Promise<{ response: http.IncomingMessage; body: Array; }> listFundingBook(currency) + +Order book of lending loans(Deprecated) + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.MarginApi(client); +const currency = "BTC"; // string | Retrieve data of the specified currency +api.listFundingBook(currency) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [FundingBookItem](FundingBookItem.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## listLoans > Promise<{ response: http.IncomingMessage; body: Array; }> listLoans(status, side, opts) -List all loans +List all loans(Deprecated) ### Example @@ -367,7 +497,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Loan; }> createLoan(loan) -Lend or borrow +Lend or borrow(Deprecated) ### Example @@ -410,7 +540,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Loan; }> mergeLoans(currency, ids) -Merge multiple lending loans +Merge multiple lending loans(Deprecated) ### Example @@ -455,7 +585,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Loan; }> getLoan(loanId, side) -Retrieve one single loan detail +Retrieve one single loan detail(Deprecated) ### Example @@ -500,7 +630,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Loan; }> cancelLoan(loanId, currency) -Cancel lending loan +Cancel lending loan(Deprecated) Only lent loans can be cancelled @@ -547,7 +677,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Loan; }> updateLoan(loanId, loanPatch) -Modify a loan +Modify a loan(Deprecated) Only `auto_renew` modification is supported currently @@ -594,7 +724,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Array; }> listLoanRepayments(loanId) -List loan repayment records +List loan repayment records(Deprecated) ### Example @@ -637,7 +767,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Repayment](Repaym > Promise<{ response: http.IncomingMessage; body: Loan; }> repayLoan(loanId, repayRequest) -Repay a loan +Repay a loan(Deprecated) ### Example @@ -682,7 +812,7 @@ Promise<{ response: AxiosResponse; body: Loan; }> [Loan](Loan.md) > Promise<{ response: http.IncomingMessage; body: Array; }> listLoanRecords(loanId, opts) -List repayment records of a specific loan +List repayment records of a specific loan(Deprecated) ### Example @@ -733,7 +863,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [LoanRecord](Loan > Promise<{ response: http.IncomingMessage; body: LoanRecord; }> getLoanRecord(loanRecordId, loanId) -Get one single loan record +Get one single loan record(Deprecated) ### Example @@ -778,7 +908,7 @@ Promise<{ response: AxiosResponse; body: LoanRecord; }> [LoanRecord](LoanRecord. > Promise<{ response: http.IncomingMessage; body: LoanRecord; }> updateLoanRecord(loanRecordId, loanPatch) -Modify a loan record +Modify a loan record(Deprecated) Only `auto_renew` modification is supported currently @@ -821,140 +951,11 @@ Promise<{ response: AxiosResponse; body: LoanRecord; }> [LoanRecord](LoanRecord. - **Content-Type**: application/json - **Accept**: application/json -## getAutoRepayStatus - -> Promise<{ response: http.IncomingMessage; body: AutoRepaySetting; }> getAutoRepayStatus() - -Retrieve user auto repayment setting - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.MarginApi(client); -api.getAutoRepayStatus() - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> [AutoRepaySetting](AutoRepaySetting.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## setAutoRepay - -> Promise<{ response: http.IncomingMessage; body: AutoRepaySetting; }> setAutoRepay(status) - -Update user\'s auto repayment setting - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.MarginApi(client); -const status = "on"; // string | New auto repayment status. `on` - enabled, `off` - disabled -api.setAutoRepay(status) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **string**| New auto repayment status. `on` - enabled, `off` - disabled | [default to undefined] - -### Return type - -Promise<{ response: AxiosResponse; body: AutoRepaySetting; }> [AutoRepaySetting](AutoRepaySetting.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -## getMarginTransferable - -> Promise<{ response: http.IncomingMessage; body: MarginTransferable; }> getMarginTransferable(currency, opts) - -Get the max transferable amount for a specific margin currency - -### Example - -```typescript -const GateApi = require('gate-api'); -const client = new GateApi.ApiClient(); -// uncomment the next line to change base path -// client.basePath = "https://some-other-host" -// Configure Gate APIv4 key authentication: -client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); - -const api = new GateApi.MarginApi(client); -const currency = "BTC"; // string | Retrieve data of the specified currency -const opts = { - 'currencyPair': "BTC_USDT" // string | Currency pair -}; -api.getMarginTransferable(currency, opts) - .then(value => console.log('API called successfully. Returned data: ', value.body), - error => console.error(error)); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **currency** | **string**| Retrieve data of the specified currency | [default to undefined] - **currencyPair** | **string**| Currency pair | [optional] [default to undefined] - -### Return type - -Promise<{ response: AxiosResponse; body: MarginTransferable; }> [MarginTransferable](MarginTransferable.md) - -### Authorization - -[apiv4](../README.md#apiv4) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - ## getMarginBorrowable > Promise<{ response: http.IncomingMessage; body: MarginBorrowable; }> getMarginBorrowable(currency, opts) -Get the max borrowable amount for a specific margin currency +Get the max borrowable amount for a specific margin currency(Deprecated) ### Example @@ -1414,6 +1415,55 @@ Promise<{ response: AxiosResponse; body: Array; }> [CrossMargin - **Content-Type**: application/json - **Accept**: application/json +## getCrossMarginInterestRecords + +> Promise<{ response: http.IncomingMessage; body: Array; }> getCrossMarginInterestRecords(opts) + +Interest records for the cross margin account + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginApi(client); +const opts = { + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.getCrossMarginInterestRecords(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLoanInterestRecord](UniLoanInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + ## getCrossMarginTransferable > Promise<{ response: http.IncomingMessage; body: CrossMarginTransferable; }> getCrossMarginTransferable(currency) diff --git a/docs/MarginUniApi.md b/docs/MarginUniApi.md new file mode 100644 index 0000000..aa61ca2 --- /dev/null +++ b/docs/MarginUniApi.md @@ -0,0 +1,335 @@ +# MarginUniApi + +All URIs are relative to *https://api.gateio.ws/api/v4* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listUniCurrencyPairs**](MarginUniApi.md#listUniCurrencyPairs) | **GET** /margin/uni/currency_pairs | List lending markets +[**getUniCurrencyPair**](MarginUniApi.md#getUniCurrencyPair) | **GET** /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market +[**listUniLoans**](MarginUniApi.md#listUniLoans) | **GET** /margin/uni/loans | List loans +[**createUniLoan**](MarginUniApi.md#createUniLoan) | **POST** /margin/uni/loans | Borrow or repay +[**listUniLoanRecords**](MarginUniApi.md#listUniLoanRecords) | **GET** /margin/uni/loan_records | Get load records +[**listUniLoanInterestRecords**](MarginUniApi.md#listUniLoanInterestRecords) | **GET** /margin/uni/interest_records | List interest records +[**getUniBorrowable**](MarginUniApi.md#getUniBorrowable) | **GET** /margin/uni/borrowable | Get maximum borrowable + + +## listUniCurrencyPairs + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniCurrencyPairs() + +List lending markets + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.MarginUniApi(client); +api.listUniCurrencyPairs() + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniCurrencyPair](UniCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## getUniCurrencyPair + +> Promise<{ response: http.IncomingMessage; body: UniCurrencyPair; }> getUniCurrencyPair(currencyPair) + +Get detail of lending market + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" + +const api = new GateApi.MarginUniApi(client); +const currencyPair = "AE_USDT"; // string | Currency pair +api.getUniCurrencyPair(currencyPair) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencyPair** | **string**| Currency pair | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: UniCurrencyPair; }> [UniCurrencyPair](UniCurrencyPair.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## listUniLoans + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniLoans(opts) + +List loans + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginUniApi(client); +const opts = { + 'currencyPair': "BTC_USDT", // string | Currency pair + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.listUniLoans(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencyPair** | **string**| Currency pair | [optional] [default to undefined] + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLoan](UniLoan.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## createUniLoan + +> Promise<{ response: http.IncomingMessage; body?: any; }> createUniLoan(createUniLoan) + +Borrow or repay + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginUniApi(client); +const createUniLoan = new CreateUniLoan(); // CreateUniLoan | +api.createUniLoan(createUniLoan) + .then(value => console.log('API called successfully.'), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUniLoan** | [**CreateUniLoan**](CreateUniLoan.md)| | + +### Return type + +Promise<{ response: AxiosResponse; body?: any; }> + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +## listUniLoanRecords + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniLoanRecords(opts) + +Get load records + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginUniApi(client); +const opts = { + 'type': "type_example", // 'borrow' | 'repay' | type: borrow - borrow, repay - repay + 'currency': "BTC", // string | Retrieve data of the specified currency + 'currencyPair': "BTC_USDT", // string | Currency pair + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.listUniLoanRecords(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **Type**| type: borrow - borrow, repay - repay | [optional] [default to undefined] + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **currencyPair** | **string**| Currency pair | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLoanRecord](UniLoanRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## listUniLoanInterestRecords + +> Promise<{ response: http.IncomingMessage; body: Array; }> listUniLoanInterestRecords(opts) + +List interest records + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginUniApi(client); +const opts = { + 'currencyPair': "BTC_USDT", // string | Currency pair + 'currency': "BTC", // string | Retrieve data of the specified currency + 'page': 1, // number | Page number + 'limit': 100 // number | Maximum response items. Default: 100, minimum: 1, Maximum: 100 +}; +api.listUniLoanInterestRecords(opts) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currencyPair** | **string**| Currency pair | [optional] [default to undefined] + **currency** | **string**| Retrieve data of the specified currency | [optional] [default to undefined] + **page** | **number**| Page number | [optional] [default to 1] + **limit** | **number**| Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] + +### Return type + +Promise<{ response: AxiosResponse; body: Array; }> [UniLoanInterestRecord](UniLoanInterestRecord.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## getUniBorrowable + +> Promise<{ response: http.IncomingMessage; body: MaxUniBorrowable; }> getUniBorrowable(currency, currencyPair) + +Get maximum borrowable + +### Example + +```typescript +const GateApi = require('gate-api'); +const client = new GateApi.ApiClient(); +// uncomment the next line to change base path +// client.basePath = "https://some-other-host" +// Configure Gate APIv4 key authentication: +client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); + +const api = new GateApi.MarginUniApi(client); +const currency = "BTC"; // string | Retrieve data of the specified currency +const currencyPair = "BTC_USDT"; // string | Currency pair +api.getUniBorrowable(currency, currencyPair) + .then(value => console.log('API called successfully. Returned data: ', value.body), + error => console.error(error)); +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **currency** | **string**| Retrieve data of the specified currency | [default to undefined] + **currencyPair** | **string**| Currency pair | [default to undefined] + +### Return type + +Promise<{ response: AxiosResponse; body: MaxUniBorrowable; }> [MaxUniBorrowable](MaxUniBorrowable.md) + +### Authorization + +[apiv4](../README.md#apiv4) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json diff --git a/docs/MaxUniBorrowable.md b/docs/MaxUniBorrowable.md new file mode 100644 index 0000000..e2cb7c7 --- /dev/null +++ b/docs/MaxUniBorrowable.md @@ -0,0 +1,10 @@ +# MaxUniBorrowable + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency | [readonly] [default to undefined] +**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] +**borrowable** | **string** | Maximum borrowable | [readonly] [default to undefined] + diff --git a/docs/MyFuturesTradeTimeRange.md b/docs/MyFuturesTradeTimeRange.md new file mode 100644 index 0000000..b4193e9 --- /dev/null +++ b/docs/MyFuturesTradeTimeRange.md @@ -0,0 +1,24 @@ +# MyFuturesTradeTimeRange + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tradeId** | **string** | Trade ID | [optional] [default to undefined] +**createTime** | **number** | Trading time | [optional] [default to undefined] +**contract** | **string** | Futures contract | [optional] [default to undefined] +**orderId** | **string** | Order ID related | [optional] [default to undefined] +**size** | **number** | Trading size | [optional] [default to undefined] +**price** | **string** | Trading price | [optional] [default to undefined] +**role** | **string** | Trade role. Available values are `taker` and `maker` | [optional] [default to undefined] +**text** | **string** | User defined information | [optional] [default to undefined] +**fee** | **string** | Fee deducted | [optional] [default to undefined] +**pointFee** | **string** | Points used to deduct fee | [optional] [default to undefined] + +## Enum: MyFuturesTradeTimeRange.Role + +* `Taker` (value: `'taker'`) + +* `Maker` (value: `'maker'`) + + diff --git a/docs/Order.md b/docs/Order.md index 6f3a106..0ba7379 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | Order ID | [optional] [readonly] [default to undefined] **text** | **string** | User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 | [optional] [default to undefined] +**amendText** | **string** | The custom data that the user remarked when amending the order | [optional] [readonly] [default to undefined] **createTime** | **string** | Creation time of order | [optional] [readonly] [default to undefined] **updateTime** | **string** | Last modification time of order | [optional] [readonly] [default to undefined] **createTimeMs** | **number** | Creation time of order (in milliseconds) | [optional] [readonly] [default to undefined] @@ -34,6 +35,9 @@ Name | Type | Description | Notes **gtDiscount** | **boolean** | Whether GT fee discount is used | [optional] [readonly] [default to undefined] **rebatedFee** | **string** | Rebated fee | [optional] [readonly] [default to undefined] **rebatedFeeCurrency** | **string** | Rebated fee currency unit | [optional] [readonly] [default to undefined] +**stpId** | **number** | Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` | [optional] [readonly] [default to undefined] +**stpAct** | **string** | Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled | [optional] [default to undefined] +**finishAs** | **string** | How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention | [optional] [readonly] [default to undefined] ## Enum: Order.Status @@ -78,3 +82,27 @@ Name | Type | Description | Notes * `Fok` (value: `'fok'`) +## Enum: Order.StpAct + +* `Cn` (value: `'cn'`) + +* `Co` (value: `'co'`) + +* `Cb` (value: `'cb'`) + +* `Minus` (value: `'-'`) + + +## Enum: Order.FinishAs + +* `Open` (value: `'open'`) + +* `Filled` (value: `'filled'`) + +* `Cancelled` (value: `'cancelled'`) + +* `Ioc` (value: `'ioc'`) + +* `Stp` (value: `'stp'`) + + diff --git a/docs/OrderPatch.md b/docs/OrderPatch.md index 70d2e64..062b742 100644 --- a/docs/OrderPatch.md +++ b/docs/OrderPatch.md @@ -6,4 +6,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **string** | New order amount. `amount` and `price` must specify one of them | [optional] [default to undefined] **price** | **string** | New order price. `amount` and `Price` must specify one of them\" | [optional] [default to undefined] +**amendText** | **string** | Custom info during amending order | [optional] [default to undefined] diff --git a/docs/PatchUniLend.md b/docs/PatchUniLend.md new file mode 100644 index 0000000..16d17ed --- /dev/null +++ b/docs/PatchUniLend.md @@ -0,0 +1,9 @@ +# PatchUniLend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency name | [optional] [default to undefined] +**minRate** | **string** | Minimum interest rate | [optional] [default to undefined] + diff --git a/docs/Position.md b/docs/Position.md index b527ffa..92f742f 100644 --- a/docs/Position.md +++ b/docs/Position.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **lastClosePnl** | **string** | PNL of last position close | [optional] [readonly] [default to undefined] **realisedPoint** | **string** | Realized POINT PNL | [optional] [readonly] [default to undefined] **historyPoint** | **string** | History realized POINT PNL | [optional] [readonly] [default to undefined] -**adlRanking** | **number** | ADL ranking, ranging from 1 to 5 | [optional] [readonly] [default to undefined] +**adlRanking** | **number** | Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation | [optional] [readonly] [default to undefined] **pendingOrders** | **number** | Current open orders | [optional] [readonly] [default to undefined] **closeOrder** | [**PositionCloseOrder**](PositionCloseOrder.md) | | [optional] [default to undefined] **mode** | **string** | Position mode, including: - `single`: dual mode is not enabled- `dual_long`: long position in dual mode- `dual_short`: short position in dual mode | [optional] [default to undefined] diff --git a/docs/SpotApi.md b/docs/SpotApi.md index 27a704d..1a0a1ad 100644 --- a/docs/SpotApi.md +++ b/docs/SpotApi.md @@ -744,7 +744,7 @@ Promise<{ response: AxiosResponse; body: Array; }> [Order](Order.md) Create an order -You can place orders with spot, margin or cross margin account through setting the `account `field. It defaults to `spot`, which means spot account is used to place orders. When margin account is used, i.e., `account` is `margin`, `auto_borrow` field can be set to `true` to enable the server to borrow the amount lacked using `POST /margin/loans` when your account\'s balance is not enough. Whether margin orders\' fill will be used to repay margin loans automatically is determined by the auto repayment setting in your **margin account**, which can be updated or queried using `/margin/auto_repay` API. When cross margin account is used, i.e., `account` is `cross_margin`, `auto_borrow` can also be enabled to achieve borrowing the insufficient amount automatically if cross account\'s balance is not enough. But it differs from margin account that automatic repayment is determined by order\'s `auto_repay` field and only current order\'s fill will be used to repay cross margin loans. Automatic repayment will be triggered when the order is finished, i.e., its status is either `cancelled` or `closed`. **Order status** An order waiting to be filled is `open`, and it stays `open` until it is filled totally. If fully filled, order is finished and its status turns to `closed`.If the order is cancelled before it is totally filled, whether or not partially filled, its status is `cancelled`. **Iceberg order** `iceberg` field can be used to set the amount shown. Set to `-1` to hide the order completely. Note that the hidden part\'s fee will be charged using taker\'s fee rate. +You can place orders with spot, margin or cross margin account through setting the `account `field. It defaults to `spot`, which means spot account is used to place orders. When margin account is used, i.e., `account` is `margin`, `auto_borrow` field can be set to `true` to enable the server to borrow the amount lacked using `POST /margin/loans` when your account\'s balance is not enough. Whether margin orders\' fill will be used to repay margin loans automatically is determined by the auto repayment setting in your **margin account**, which can be updated or queried using `/margin/auto_repay` API. When cross margin account is used, i.e., `account` is `cross_margin`, `auto_borrow` can also be enabled to achieve borrowing the insufficient amount automatically if cross account\'s balance is not enough. But it differs from margin account that automatic repayment is determined by order\'s `auto_repay` field and only current order\'s fill will be used to repay cross margin loans. Automatic repayment will be triggered when the order is finished, i.e., its status is either `cancelled` or `closed`. **Order status** An order waiting to be filled is `open`, and it stays `open` until it is filled totally. If fully filled, order is finished and its status turns to `closed`.If the order is cancelled before it is totally filled, whether or not partially filled, its status is `cancelled`. **Iceberg order** `iceberg` field can be used to set the amount shown. Set to `-1` to hide the order completely. Note that the hidden part\'s fee will be charged using taker\'s fee rate. **Self Trade Prevention** - Set `stp_act` to decide the strategy of self-trade prevention. For detailed usage, refer to the `stp_act` parameter in request body ### Example diff --git a/docs/SubAccount.md b/docs/SubAccount.md index d676c32..20d73fe 100644 --- a/docs/SubAccount.md +++ b/docs/SubAccount.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **password** | **string** | The sub-account\'s password. (Default: the same as main account\'s password) | [optional] [default to undefined] **email** | **string** | The sub-account\'s email address. (Default: the same as main account\'s email address) | [optional] [default to undefined] **state** | **number** | State: 1-normal, 2-locked\" | [optional] [readonly] [default to undefined] -**type** | **number** | Type: 1-Sub-account | [optional] [default to undefined] +**type** | **number** | \"Sub-account type: 1 - sub-account, 3 - cross margin account | [optional] [default to undefined] **userId** | **number** | The user id of the sub-account | [optional] [readonly] [default to undefined] **createTime** | **number** | Created time | [optional] [readonly] [default to undefined] diff --git a/docs/SubAccountApi.md b/docs/SubAccountApi.md index 51cf212..25b2eb3 100644 --- a/docs/SubAccountApi.md +++ b/docs/SubAccountApi.md @@ -18,7 +18,7 @@ Method | HTTP request | Description ## listSubAccounts -> Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccounts() +> Promise<{ response: http.IncomingMessage; body: Array; }> listSubAccounts(opts) List sub-accounts @@ -33,14 +33,20 @@ const client = new GateApi.ApiClient(); client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET"); const api = new GateApi.SubAccountApi(client); -api.listSubAccounts() +const opts = { + 'type': "0" // string | `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. +}; +api.listSubAccounts(opts) .then(value => console.log('API called successfully. Returned data: ', value.body), error => console.error(error)); ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **type** | **string**| `0` to list all types of sub-accounts (currently supporting cross margin accounts and sub-accounts). `1` to list sub-accounts only. If no parameter is passed, only sub-accounts will be listed by default. | [optional] [default to undefined] ### Return type diff --git a/docs/SubAccountTransfer.md b/docs/SubAccountTransfer.md index 97dbbf9..d93edcc 100644 --- a/docs/SubAccountTransfer.md +++ b/docs/SubAccountTransfer.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **uid** | **string** | Main account user ID | [optional] [readonly] [default to undefined] **timest** | **string** | Transfer timestamp | [optional] [readonly] [default to undefined] **source** | **string** | Where the operation is initiated from | [optional] [readonly] [default to undefined] -**subAccountType** | **string** | Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account | [optional] [default to 'spot'] +**subAccountType** | **string** | Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account, `delivery` - delivery account | [optional] [default to 'spot'] ## Enum: SubAccountTransfer.Direction @@ -28,4 +28,6 @@ Name | Type | Description | Notes * `CrossMargin` (value: `'cross_margin'`) +* `Delivery` (value: `'delivery'`) + diff --git a/docs/SubCrossMarginAccount.md b/docs/SubCrossMarginAccount.md index d59ed52..4af0c5e 100644 --- a/docs/SubCrossMarginAccount.md +++ b/docs/SubCrossMarginAccount.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **userId** | **number** | User ID of the cross margin account. 0 means that the subaccount has not yet opened a cross margin account | [optional] [default to undefined] **locked** | **boolean** | Whether account is locked | [optional] [default to undefined] -**balances** | [**{ [key: string]: CrossMarginBalance; }**](CrossMarginBalance.md) | | [optional] [default to undefined] +**balances** | [**{ [key: string]: CrossMarginBalance1; }**](CrossMarginBalance1.md) | | [optional] [default to undefined] **total** | **string** | Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` | [optional] [default to undefined] **borrowed** | **string** | Total borrowed value in USDT, i.e., the sum of all currencies\' `borrowed*price*discount` | [optional] [default to undefined] **borrowedNet** | **string** | Total borrowed value in USDT * borrowed factor | [optional] [default to undefined] diff --git a/docs/Trade.md b/docs/Trade.md index aacf240..5fa0c9b 100644 --- a/docs/Trade.md +++ b/docs/Trade.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **feeCurrency** | **string** | Fee currency unit. No value in public endpoints | [optional] [default to undefined] **pointFee** | **string** | Points used to deduct fee. No value in public endpoints | [optional] [default to undefined] **gtFee** | **string** | GT used to deduct fee. No value in public endpoints | [optional] [default to undefined] +**amendText** | **string** | The custom data that the user remarked when amending the order | [optional] [default to undefined] ## Enum: Trade.Side diff --git a/docs/UniCurrency.md b/docs/UniCurrency.md new file mode 100644 index 0000000..0d4ea22 --- /dev/null +++ b/docs/UniCurrency.md @@ -0,0 +1,12 @@ +# UniCurrency + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency name | [optional] [readonly] [default to undefined] +**minLendAmount** | **string** | Minimum lend amount | [optional] [readonly] [default to undefined] +**maxLendAmount** | **string** | Maximum lend amount | [optional] [readonly] [default to undefined] +**maxRate** | **string** | Maximum rate (Hourly) | [optional] [readonly] [default to undefined] +**minRate** | **string** | Minimum rate (Hourly) | [optional] [readonly] [default to undefined] + diff --git a/docs/UniCurrencyPair.md b/docs/UniCurrencyPair.md new file mode 100644 index 0000000..d5269aa --- /dev/null +++ b/docs/UniCurrencyPair.md @@ -0,0 +1,11 @@ +# UniCurrencyPair + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] +**baseMinBorrowAmount** | **string** | Minimum borrow amount of base currency | [optional] [readonly] [default to undefined] +**quoteMinBorrowAmount** | **string** | Minimum borrow amount of quote currency | [optional] [readonly] [default to undefined] +**leverage** | **string** | Position leverage | [optional] [readonly] [default to undefined] + diff --git a/docs/UniInterestRecord.md b/docs/UniInterestRecord.md new file mode 100644 index 0000000..4c17c0c --- /dev/null +++ b/docs/UniInterestRecord.md @@ -0,0 +1,12 @@ +# UniInterestRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **number** | Status: 0 - fail, 1 - success | [optional] [readonly] [default to undefined] +**currency** | **string** | Currency | [optional] [readonly] [default to undefined] +**actualRate** | **string** | Actual Rate | [optional] [readonly] [default to undefined] +**interest** | **string** | Interest | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLend.md b/docs/UniLend.md new file mode 100644 index 0000000..b7bfc38 --- /dev/null +++ b/docs/UniLend.md @@ -0,0 +1,15 @@ +# UniLend + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency | [optional] [readonly] [default to undefined] +**currentAmount** | **string** | Current amount | [optional] [readonly] [default to undefined] +**amount** | **string** | Total amount | [optional] [readonly] [default to undefined] +**lentAmount** | **string** | Lent amount | [optional] [readonly] [default to undefined] +**frozenAmount** | **string** | Frozen amount | [optional] [readonly] [default to undefined] +**minRate** | **string** | Minimum interest rate | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time of the lending order | [optional] [readonly] [default to undefined] +**updateTime** | **number** | Upated time of the lending order | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLendInterest.md b/docs/UniLendInterest.md new file mode 100644 index 0000000..f2801f2 --- /dev/null +++ b/docs/UniLendInterest.md @@ -0,0 +1,9 @@ +# UniLendInterest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency | [optional] [readonly] [default to undefined] +**interest** | **string** | Interest | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLendRecord.md b/docs/UniLendRecord.md new file mode 100644 index 0000000..cf6f9a8 --- /dev/null +++ b/docs/UniLendRecord.md @@ -0,0 +1,14 @@ +# UniLendRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency name | [optional] [readonly] [default to undefined] +**amount** | **string** | current amount | [optional] [readonly] [default to undefined] +**lastWalletAmount** | **string** | Last wallet amount | [optional] [readonly] [default to undefined] +**lastLentAmount** | **string** | Last lent amount | [optional] [readonly] [default to undefined] +**lastFrozenAmount** | **string** | Last frozen amount | [optional] [readonly] [default to undefined] +**type** | **string** | Record type: lend - lend, redeem - redeem | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLoan.md b/docs/UniLoan.md new file mode 100644 index 0000000..530e7dd --- /dev/null +++ b/docs/UniLoan.md @@ -0,0 +1,12 @@ +# UniLoan + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency | [optional] [readonly] [default to undefined] +**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] +**amount** | **string** | amount | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] +**updateTime** | **number** | Updated time | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLoanInterestRecord.md b/docs/UniLoanInterestRecord.md new file mode 100644 index 0000000..343fa39 --- /dev/null +++ b/docs/UniLoanInterestRecord.md @@ -0,0 +1,13 @@ +# UniLoanInterestRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currency** | **string** | Currency name | [optional] [readonly] [default to undefined] +**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] +**actualRate** | **string** | Actual rate | [optional] [readonly] [default to undefined] +**interest** | **string** | Interest | [optional] [readonly] [default to undefined] +**status** | **number** | Status: 0 - fail, 1 - success | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] + diff --git a/docs/UniLoanRecord.md b/docs/UniLoanRecord.md new file mode 100644 index 0000000..5899da4 --- /dev/null +++ b/docs/UniLoanRecord.md @@ -0,0 +1,12 @@ +# UniLoanRecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | type: borrow - borrow, repay - repay | [optional] [readonly] [default to undefined] +**currencyPair** | **string** | Currency pair | [optional] [readonly] [default to undefined] +**currency** | **string** | Currency | [optional] [readonly] [default to undefined] +**amount** | **string** | The amount of lending or repaying | [optional] [readonly] [default to undefined] +**createTime** | **number** | Created time | [optional] [readonly] [default to undefined] + diff --git a/model/accountDetail.ts b/model/accountDetail.ts new file mode 100644 index 0000000..6690dce --- /dev/null +++ b/model/accountDetail.ts @@ -0,0 +1,52 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Account detail + */ +export class AccountDetail { + /** + * IP whitelist + */ + 'ipWhitelist'?: Array; + /** + * CurrencyPair whitelisting + */ + 'currencyPairs'?: Array; + /** + * User ID + */ + 'userId'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'ipWhitelist', + baseName: 'ip_whitelist', + type: 'Array', + }, + { + name: 'currencyPairs', + baseName: 'currency_pairs', + type: 'Array', + }, + { + name: 'userId', + baseName: 'user_id', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return AccountDetail.attributeTypeMap; + } +} diff --git a/model/batchFuturesOrder.ts b/model/batchFuturesOrder.ts index dee52d7..35f46cc 100644 --- a/model/batchFuturesOrder.ts +++ b/model/batchFuturesOrder.ts @@ -42,7 +42,7 @@ export class BatchFuturesOrder { */ 'finishTime'?: number; /** - * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close + * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention */ 'finishAs'?: BatchFuturesOrder.FinishAs; /** @@ -117,6 +117,14 @@ export class BatchFuturesOrder { * Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 */ 'autoSize'?: BatchFuturesOrder.AutoSize; + /** + * Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled + */ + 'stpAct'?: BatchFuturesOrder.StpAct; + /** + * Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` + */ + 'stpId'?: number; static discriminator: string | undefined = undefined; @@ -251,6 +259,16 @@ export class BatchFuturesOrder { baseName: 'auto_size', type: 'BatchFuturesOrder.AutoSize', }, + { + name: 'stpAct', + baseName: 'stp_act', + type: 'BatchFuturesOrder.StpAct', + }, + { + name: 'stpId', + baseName: 'stp_id', + type: 'number', + }, ]; static getAttributeTypeMap() { @@ -268,6 +286,7 @@ export namespace BatchFuturesOrder { ReduceOnly = 'reduce_only', PositionClosed = 'position_closed', ReduceOut = 'reduce_out', + Stp = 'stp', } export enum Status { Open = 'open', @@ -283,4 +302,10 @@ export namespace BatchFuturesOrder { Long = 'close_long', Short = 'close_short', } + export enum StpAct { + Co = 'co', + Cn = 'cn', + Cb = 'cb', + Minus = '-', + } } diff --git a/model/batchOrder.ts b/model/batchOrder.ts index 719b9f5..44d37db 100644 --- a/model/batchOrder.ts +++ b/model/batchOrder.ts @@ -133,6 +133,18 @@ export class BatchOrder { * Rebated fee currency unit */ 'rebatedFeeCurrency'?: string; + /** + * Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` + */ + 'stpId'?: number; + /** + * Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled + */ + 'stpAct'?: BatchOrder.StpAct; + /** + * How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention + */ + 'finishAs'?: BatchOrder.FinishAs; static discriminator: string | undefined = undefined; @@ -287,6 +299,21 @@ export class BatchOrder { baseName: 'rebated_fee_currency', type: 'string', }, + { + name: 'stpId', + baseName: 'stp_id', + type: 'number', + }, + { + name: 'stpAct', + baseName: 'stp_act', + type: 'BatchOrder.StpAct', + }, + { + name: 'finishAs', + baseName: 'finish_as', + type: 'BatchOrder.FinishAs', + }, ]; static getAttributeTypeMap() { @@ -319,4 +346,17 @@ export namespace BatchOrder { Poc = 'poc', Fok = 'fok', } + export enum StpAct { + Cn = 'cn', + Co = 'co', + Cb = 'cb', + Minus = '-', + } + export enum FinishAs { + Open = 'open', + Filled = 'filled', + Cancelled = 'cancelled', + Ioc = 'ioc', + Stp = 'stp', + } } diff --git a/model/contract.ts b/model/contract.ts index 29014bc..d0fca33 100644 --- a/model/contract.ts +++ b/model/contract.ts @@ -149,6 +149,10 @@ export class Contract { * Whether portfolio margin account is enabled */ 'enableCredit'?: boolean; + /** + * Created time of the contract + */ + 'createTime'?: number; static discriminator: string | undefined = undefined; @@ -323,6 +327,11 @@ export class Contract { baseName: 'enable_credit', type: 'boolean', }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, ]; static getAttributeTypeMap() { diff --git a/model/createUniLend.ts b/model/createUniLend.ts new file mode 100644 index 0000000..8edd18c --- /dev/null +++ b/model/createUniLend.ts @@ -0,0 +1,68 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Lend or redeem + */ +export class CreateUniLend { + /** + * Currency name + */ + 'currency': string; + /** + * The amount of currency could be lent + */ + 'amount': string; + /** + * type: lend - lend, redeem - redeem + */ + 'type': CreateUniLend.Type; + /** + * The minimum interest rate. If the value is too high, it might lead to the unsuccessful lending and no profit will be gained for that hour. + */ + 'minRate'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'type', + baseName: 'type', + type: 'CreateUniLend.Type', + }, + { + name: 'minRate', + baseName: 'min_rate', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return CreateUniLend.attributeTypeMap; + } +} + +export namespace CreateUniLend { + export enum Type { + Lend = 'lend', + Redeem = 'redeem', + } +} diff --git a/model/createUniLoan.ts b/model/createUniLoan.ts new file mode 100644 index 0000000..c83c881 --- /dev/null +++ b/model/createUniLoan.ts @@ -0,0 +1,77 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Borrow or repay + */ +export class CreateUniLoan { + /** + * Currency + */ + 'currency': string; + /** + * type: borrow - borrow, repay - repay + */ + 'type': CreateUniLoan.Type; + /** + * The amount of lending or repaying + */ + 'amount': string; + /** + * Full repayment. Repay operation only. If the value is `true`, the amount will be ignored and the loan will be repaid in full. + */ + 'repaidAll'?: boolean; + /** + * Currency pair + */ + 'currencyPair': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'type', + baseName: 'type', + type: 'CreateUniLoan.Type', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'repaidAll', + baseName: 'repaid_all', + type: 'boolean', + }, + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return CreateUniLoan.attributeTypeMap; + } +} + +export namespace CreateUniLoan { + export enum Type { + Borrow = 'borrow', + Repay = 'repay', + } +} diff --git a/model/crossMarginAccount.ts b/model/crossMarginAccount.ts index 3f52106..a01b06f 100644 --- a/model/crossMarginAccount.ts +++ b/model/crossMarginAccount.ts @@ -16,6 +16,10 @@ export class CrossMarginAccount { * User ID */ 'userId'?: number; + /** + * Time of the most recent refresh + */ + 'refreshTime'?: number; /** * Whether account is locked */ @@ -42,7 +46,7 @@ export class CrossMarginAccount { */ 'totalInitialMargin'?: string; /** - * Total margin balance + * Total Margin Balance (∑(positive equity * index price * discount) + ∑(negative equity * index price)) */ 'totalMarginBalance'?: string; /** @@ -65,6 +69,14 @@ export class CrossMarginAccount { * Total amount of the portfolio margin account */ 'portfolioMarginTotal'?: string; + /** + * Total liabilities of the portfolio margin account + */ + 'portfolioMarginTotalLiab'?: string; + /** + * Total equity of the portfolio margin account + */ + 'portfolioMarginTotalEquity'?: string; static discriminator: string | undefined = undefined; @@ -74,6 +86,11 @@ export class CrossMarginAccount { baseName: 'user_id', type: 'number', }, + { + name: 'refreshTime', + baseName: 'refresh_time', + type: 'number', + }, { name: 'locked', baseName: 'locked', @@ -139,6 +156,16 @@ export class CrossMarginAccount { baseName: 'portfolio_margin_total', type: 'string', }, + { + name: 'portfolioMarginTotalLiab', + baseName: 'portfolio_margin_total_liab', + type: 'string', + }, + { + name: 'portfolioMarginTotalEquity', + baseName: 'portfolio_margin_total_equity', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/crossMarginAccountBook.ts b/model/crossMarginAccountBook.ts index 01f9952..313c1fd 100644 --- a/model/crossMarginAccountBook.ts +++ b/model/crossMarginAccountBook.ts @@ -31,7 +31,7 @@ export class CrossMarginAccountBook { */ 'balance'?: string; /** - * Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - unknown: unknown type + * Account change type, including: - in: transferals into cross margin account - out: transferals out from cross margin account - repay: loan repayment - borrow: borrowed loan - interest: interest - new_order: new order locked - order_fill: order fills - referral_fee: fee refund from referrals - order_fee: order fee generated from fills - futures_in: transfer into futures account - futures_out: transfer out of futures account - unknown: unknown type */ 'type'?: CrossMarginAccountBook.Type; @@ -86,6 +86,8 @@ export namespace CrossMarginAccountBook { OrderFill = 'order_fill', ReferralFee = 'referral_fee', OrderFee = 'order_fee', + FuturesIn = 'futures_in', + FuturesOut = 'futures_out', Unknown = 'unknown', } } diff --git a/model/crossMarginBalance.ts b/model/crossMarginBalance.ts index 9fd5f46..914259f 100644 --- a/model/crossMarginBalance.ts +++ b/model/crossMarginBalance.ts @@ -26,6 +26,26 @@ export class CrossMarginBalance { * Unpaid interests */ 'interest'?: string; + /** + * Negative Liabilities. Formula:Min[available+total+unrealized_pnl,0] + */ + 'negativeLiab'?: string; + /** + * Borrowing to Open Positions in Futures + */ + 'futuresPosLiab'?: string; + /** + * Equity. Formula: available + freeze - borrowed + total + unrealized_pnl + */ + 'equity'?: string; + /** + * Total freeze. Formula: position_initial_margin + order_margin + */ + 'totalFreeze'?: string; + /** + * Total liabilities. Formula: Max[Abs[Min[quity - total_freeze,0], borrowed]] - futures_pos_liab + */ + 'totalLiab'?: string; static discriminator: string | undefined = undefined; @@ -50,6 +70,31 @@ export class CrossMarginBalance { baseName: 'interest', type: 'string', }, + { + name: 'negativeLiab', + baseName: 'negative_liab', + type: 'string', + }, + { + name: 'futuresPosLiab', + baseName: 'futures_pos_liab', + type: 'string', + }, + { + name: 'equity', + baseName: 'equity', + type: 'string', + }, + { + name: 'totalFreeze', + baseName: 'total_freeze', + type: 'string', + }, + { + name: 'totalLiab', + baseName: 'total_liab', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/crossMarginBalance1.ts b/model/crossMarginBalance1.ts new file mode 100644 index 0000000..c7f084e --- /dev/null +++ b/model/crossMarginBalance1.ts @@ -0,0 +1,58 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class CrossMarginBalance1 { + /** + * Available amount + */ + 'available'?: string; + /** + * Locked amount + */ + 'freeze'?: string; + /** + * Borrowed amount + */ + 'borrowed'?: string; + /** + * Unpaid interests + */ + 'interest'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'available', + baseName: 'available', + type: 'string', + }, + { + name: 'freeze', + baseName: 'freeze', + type: 'string', + }, + { + name: 'borrowed', + baseName: 'borrowed', + type: 'string', + }, + { + name: 'interest', + baseName: 'interest', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return CrossMarginBalance1.attributeTypeMap; + } +} diff --git a/model/crossMarginLoan.ts b/model/crossMarginLoan.ts index 0907735..f397a69 100644 --- a/model/crossMarginLoan.ts +++ b/model/crossMarginLoan.ts @@ -11,7 +11,7 @@ export class CrossMarginLoan { /** - * Borrow loan ID + * Loan record ID */ 'id'?: string; /** diff --git a/model/crossMarginRepayment.ts b/model/crossMarginRepayment.ts index 6fe9430..a399698 100644 --- a/model/crossMarginRepayment.ts +++ b/model/crossMarginRepayment.ts @@ -19,7 +19,7 @@ export class CrossMarginRepayment { */ 'createTime'?: number; /** - * Borrow loan ID + * Loan record ID */ 'loanId'?: string; /** diff --git a/model/flashSwapOrderRequest.ts b/model/flashSwapOrderRequest.ts index 895eaf4..802eb71 100644 --- a/model/flashSwapOrderRequest.ts +++ b/model/flashSwapOrderRequest.ts @@ -16,23 +16,23 @@ export class FlashSwapOrderRequest { /** * Preview result ID */ - 'previewId'?: string; + 'previewId': string; /** * Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` */ 'sellCurrency': string; /** - * Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` + * Amount to sell (based on the preview result) */ - 'sellAmount'?: string; + 'sellAmount': string; /** * Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` */ 'buyCurrency': string; /** - * Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` + * Amount to buy (based on the preview result) */ - 'buyAmount'?: string; + 'buyAmount': string; static discriminator: string | undefined = undefined; diff --git a/model/flashSwapPreviewRequest.ts b/model/flashSwapPreviewRequest.ts new file mode 100644 index 0000000..a707822 --- /dev/null +++ b/model/flashSwapPreviewRequest.ts @@ -0,0 +1,61 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Parameters of flash swap order creation + */ +export class FlashSwapPreviewRequest { + /** + * Currency to sell which can be retrieved from supported currency list API `GET /flash_swap/currencies` + */ + 'sellCurrency': string; + /** + * Amount to sell. It is required to choose one parameter between `sell_amount` and `buy_amount` + */ + 'sellAmount'?: string; + /** + * Currency to buy which can be retrieved from supported currency list API `GET /flash_swap/currencies` + */ + 'buyCurrency': string; + /** + * Amount to buy. It is required to choose one parameter between `sell_amount` and `buy_amount` + */ + 'buyAmount'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'sellCurrency', + baseName: 'sell_currency', + type: 'string', + }, + { + name: 'sellAmount', + baseName: 'sell_amount', + type: 'string', + }, + { + name: 'buyCurrency', + baseName: 'buy_currency', + type: 'string', + }, + { + name: 'buyAmount', + baseName: 'buy_amount', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return FlashSwapPreviewRequest.attributeTypeMap; + } +} diff --git a/model/futuresOrder.ts b/model/futuresOrder.ts index a79f998..c63ebca 100644 --- a/model/futuresOrder.ts +++ b/model/futuresOrder.ts @@ -30,7 +30,7 @@ export class FuturesOrder { */ 'finishTime'?: number; /** - * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close + * How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - stp: cancelled because self trade prevention */ 'finishAs'?: FuturesOrder.FinishAs; /** @@ -105,6 +105,18 @@ export class FuturesOrder { * Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 */ 'autoSize'?: FuturesOrder.AutoSize; + /** + * Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` + */ + 'stpId'?: number; + /** + * Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled + */ + 'stpAct'?: FuturesOrder.StpAct; + /** + * The custom data that the user remarked when amending the order + */ + 'amendText'?: string; static discriminator: string | undefined = undefined; @@ -224,6 +236,21 @@ export class FuturesOrder { baseName: 'auto_size', type: 'FuturesOrder.AutoSize', }, + { + name: 'stpId', + baseName: 'stp_id', + type: 'number', + }, + { + name: 'stpAct', + baseName: 'stp_act', + type: 'FuturesOrder.StpAct', + }, + { + name: 'amendText', + baseName: 'amend_text', + type: 'string', + }, ]; static getAttributeTypeMap() { @@ -241,6 +268,7 @@ export namespace FuturesOrder { ReduceOnly = 'reduce_only', PositionClosed = 'position_closed', ReduceOut = 'reduce_out', + Stp = 'stp', } export enum Status { Open = 'open', @@ -256,4 +284,10 @@ export namespace FuturesOrder { Long = 'close_long', Short = 'close_short', } + export enum StpAct { + Co = 'co', + Cn = 'cn', + Cb = 'cb', + Minus = '-', + } } diff --git a/model/futuresOrderAmendment.ts b/model/futuresOrderAmendment.ts index 249a328..9e22013 100644 --- a/model/futuresOrderAmendment.ts +++ b/model/futuresOrderAmendment.ts @@ -18,6 +18,10 @@ export class FuturesOrderAmendment { * New order price. */ 'price'?: string; + /** + * Custom info during amending order + */ + 'amendText'?: string; static discriminator: string | undefined = undefined; @@ -32,6 +36,11 @@ export class FuturesOrderAmendment { baseName: 'price', type: 'string', }, + { + name: 'amendText', + baseName: 'amend_text', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/futuresTicker.ts b/model/futuresTicker.ts index c6c33c4..025b049 100644 --- a/model/futuresTicker.ts +++ b/model/futuresTicker.ts @@ -86,6 +86,14 @@ export class FuturesTicker { * Basis value */ 'basisValue'?: string; + /** + * Recent lowest ask + */ + 'lowestAsk'?: string; + /** + * Recent highest bid + */ + 'highestBid'?: string; static discriminator: string | undefined = undefined; @@ -185,6 +193,16 @@ export class FuturesTicker { baseName: 'basis_value', type: 'string', }, + { + name: 'lowestAsk', + baseName: 'lowest_ask', + type: 'string', + }, + { + name: 'highestBid', + baseName: 'highest_bid', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/maxUniBorrowable.ts b/model/maxUniBorrowable.ts new file mode 100644 index 0000000..dba6a8c --- /dev/null +++ b/model/maxUniBorrowable.ts @@ -0,0 +1,49 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MaxUniBorrowable { + /** + * Currency + */ + 'currency': string; + /** + * Currency pair + */ + 'currencyPair'?: string; + /** + * Maximum borrowable + */ + 'borrowable': string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + { + name: 'borrowable', + baseName: 'borrowable', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return MaxUniBorrowable.attributeTypeMap; + } +} diff --git a/model/models.ts b/model/models.ts index 321176e..f3d9b43 100644 --- a/model/models.ts +++ b/model/models.ts @@ -1,4 +1,5 @@ export * from './accountBalance'; +export * from './accountDetail'; export * from './agencyCommission'; export * from './agencyCommissionHistory'; export * from './agencyTransaction'; @@ -13,9 +14,12 @@ export * from './contract'; export * from './contractStat'; export * from './countdownCancelAllFuturesTask'; export * from './countdownCancelAllSpotTask'; +export * from './createUniLend'; +export * from './createUniLoan'; export * from './crossMarginAccount'; export * from './crossMarginAccountBook'; export * from './crossMarginBalance'; +export * from './crossMarginBalance1'; export * from './crossMarginBorrowable'; export * from './crossMarginCurrency'; export * from './crossMarginLoan'; @@ -32,6 +36,7 @@ export * from './flashSwapCurrency'; export * from './flashSwapOrder'; export * from './flashSwapOrderPreview'; export * from './flashSwapOrderRequest'; +export * from './flashSwapPreviewRequest'; export * from './fundingAccount'; export * from './fundingBookItem'; export * from './fundingRateRecord'; @@ -65,8 +70,10 @@ export * from './marginAccountCurrency'; export * from './marginBorrowable'; export * from './marginCurrencyPair'; export * from './marginTransferable'; +export * from './maxUniBorrowable'; export * from './multiChainAddressItem'; export * from './myFuturesTrade'; +export * from './myFuturesTradeTimeRange'; export * from './openOrders'; export * from './optionsAccount'; export * from './optionsAccountBook'; @@ -85,6 +92,7 @@ export * from './optionsUnderlyingTicker'; export * from './order'; export * from './orderBook'; export * from './orderPatch'; +export * from './patchUniLend'; export * from './position'; export * from './positionClose'; export * from './positionCloseOrder'; @@ -114,6 +122,15 @@ export * from './transactionID'; export * from './transfer'; export * from './triggerOrderResponse'; export * from './triggerTime'; +export * from './uniCurrency'; +export * from './uniCurrencyPair'; +export * from './uniInterestRecord'; +export * from './uniLend'; +export * from './uniLendInterest'; +export * from './uniLendRecord'; +export * from './uniLoan'; +export * from './uniLoanInterestRecord'; +export * from './uniLoanRecord'; export * from './withdrawStatus'; import { AxiosRequestConfig } from 'axios'; @@ -122,6 +139,7 @@ import crypto = require('crypto'); import { URL } from 'url'; import { AccountBalance } from './accountBalance'; +import { AccountDetail } from './accountDetail'; import { AgencyCommission } from './agencyCommission'; import { AgencyCommissionHistory } from './agencyCommissionHistory'; import { AgencyTransaction } from './agencyTransaction'; @@ -136,9 +154,12 @@ import { Contract } from './contract'; import { ContractStat } from './contractStat'; import { CountdownCancelAllFuturesTask } from './countdownCancelAllFuturesTask'; import { CountdownCancelAllSpotTask } from './countdownCancelAllSpotTask'; +import { CreateUniLend } from './createUniLend'; +import { CreateUniLoan } from './createUniLoan'; import { CrossMarginAccount } from './crossMarginAccount'; import { CrossMarginAccountBook } from './crossMarginAccountBook'; import { CrossMarginBalance } from './crossMarginBalance'; +import { CrossMarginBalance1 } from './crossMarginBalance1'; import { CrossMarginBorrowable } from './crossMarginBorrowable'; import { CrossMarginCurrency } from './crossMarginCurrency'; import { CrossMarginLoan } from './crossMarginLoan'; @@ -155,6 +176,7 @@ import { FlashSwapCurrency } from './flashSwapCurrency'; import { FlashSwapOrder } from './flashSwapOrder'; import { FlashSwapOrderPreview } from './flashSwapOrderPreview'; import { FlashSwapOrderRequest } from './flashSwapOrderRequest'; +import { FlashSwapPreviewRequest } from './flashSwapPreviewRequest'; import { FundingAccount } from './fundingAccount'; import { FundingBookItem } from './fundingBookItem'; import { FundingRateRecord } from './fundingRateRecord'; @@ -188,8 +210,10 @@ import { MarginAccountCurrency } from './marginAccountCurrency'; import { MarginBorrowable } from './marginBorrowable'; import { MarginCurrencyPair } from './marginCurrencyPair'; import { MarginTransferable } from './marginTransferable'; +import { MaxUniBorrowable } from './maxUniBorrowable'; import { MultiChainAddressItem } from './multiChainAddressItem'; import { MyFuturesTrade } from './myFuturesTrade'; +import { MyFuturesTradeTimeRange } from './myFuturesTradeTimeRange'; import { OpenOrders } from './openOrders'; import { OptionsAccount } from './optionsAccount'; import { OptionsAccountBook } from './optionsAccountBook'; @@ -208,6 +232,7 @@ import { OptionsUnderlyingTicker } from './optionsUnderlyingTicker'; import { Order } from './order'; import { OrderBook } from './orderBook'; import { OrderPatch } from './orderPatch'; +import { PatchUniLend } from './patchUniLend'; import { Position } from './position'; import { PositionClose } from './positionClose'; import { PositionCloseOrder } from './positionCloseOrder'; @@ -237,6 +262,15 @@ import { TransactionID } from './transactionID'; import { Transfer } from './transfer'; import { TriggerOrderResponse } from './triggerOrderResponse'; import { TriggerTime } from './triggerTime'; +import { UniCurrency } from './uniCurrency'; +import { UniCurrencyPair } from './uniCurrencyPair'; +import { UniInterestRecord } from './uniInterestRecord'; +import { UniLend } from './uniLend'; +import { UniLendInterest } from './uniLendInterest'; +import { UniLendRecord } from './uniLendRecord'; +import { UniLoan } from './uniLoan'; +import { UniLoanInterestRecord } from './uniLoanInterestRecord'; +import { UniLoanRecord } from './uniLoanRecord'; import { WithdrawStatus } from './withdrawStatus'; /* tslint:disable:no-unused-variable */ @@ -250,13 +284,18 @@ const enumsMap: { [index: string]: any } = { 'BatchFuturesOrder.Status': BatchFuturesOrder.Status, 'BatchFuturesOrder.Tif': BatchFuturesOrder.Tif, 'BatchFuturesOrder.AutoSize': BatchFuturesOrder.AutoSize, + 'BatchFuturesOrder.StpAct': BatchFuturesOrder.StpAct, 'BatchOrder.Status': BatchOrder.Status, 'BatchOrder.Type': BatchOrder.Type, 'BatchOrder.Account': BatchOrder.Account, 'BatchOrder.Side': BatchOrder.Side, 'BatchOrder.TimeInForce': BatchOrder.TimeInForce, + 'BatchOrder.StpAct': BatchOrder.StpAct, + 'BatchOrder.FinishAs': BatchOrder.FinishAs, 'Contract.Type': Contract.Type, 'Contract.MarkType': Contract.MarkType, + 'CreateUniLend.Type': CreateUniLend.Type, + 'CreateUniLoan.Type': CreateUniLoan.Type, 'CrossMarginAccountBook.Type': CrossMarginAccountBook.Type, 'CrossMarginLoan.Status': CrossMarginLoan.Status, 'CurrencyPair.TradeStatus': CurrencyPair.TradeStatus, @@ -269,6 +308,7 @@ const enumsMap: { [index: string]: any } = { 'FuturesOrder.Status': FuturesOrder.Status, 'FuturesOrder.Tif': FuturesOrder.Tif, 'FuturesOrder.AutoSize': FuturesOrder.AutoSize, + 'FuturesOrder.StpAct': FuturesOrder.StpAct, 'FuturesPriceTrigger.StrategyType': FuturesPriceTrigger.StrategyType, 'FuturesPriceTrigger.PriceType': FuturesPriceTrigger.PriceType, 'FuturesPriceTrigger.Rule': FuturesPriceTrigger.Rule, @@ -280,6 +320,7 @@ const enumsMap: { [index: string]: any } = { 'LoanPatch.Side': LoanPatch.Side, 'LoanRecord.Status': LoanRecord.Status, 'MyFuturesTrade.Role': MyFuturesTrade.Role, + 'MyFuturesTradeTimeRange.Role': MyFuturesTradeTimeRange.Role, 'OptionsMyTrade.Role': OptionsMyTrade.Role, 'OptionsOrder.FinishAs': OptionsOrder.FinishAs, 'OptionsOrder.Status': OptionsOrder.Status, @@ -290,6 +331,8 @@ const enumsMap: { [index: string]: any } = { 'Order.Account': Order.Account, 'Order.Side': Order.Side, 'Order.TimeInForce': Order.TimeInForce, + 'Order.StpAct': Order.StpAct, + 'Order.FinishAs': Order.FinishAs, 'Position.Mode': Position.Mode, 'PositionClose.Side': PositionClose.Side, 'RepayRequest.Mode': RepayRequest.Mode, @@ -309,6 +352,7 @@ const enumsMap: { [index: string]: any } = { const typeMap: { [index: string]: any } = { AccountBalance: AccountBalance, + AccountDetail: AccountDetail, AgencyCommission: AgencyCommission, AgencyCommissionHistory: AgencyCommissionHistory, AgencyTransaction: AgencyTransaction, @@ -323,9 +367,12 @@ const typeMap: { [index: string]: any } = { ContractStat: ContractStat, CountdownCancelAllFuturesTask: CountdownCancelAllFuturesTask, CountdownCancelAllSpotTask: CountdownCancelAllSpotTask, + CreateUniLend: CreateUniLend, + CreateUniLoan: CreateUniLoan, CrossMarginAccount: CrossMarginAccount, CrossMarginAccountBook: CrossMarginAccountBook, CrossMarginBalance: CrossMarginBalance, + CrossMarginBalance1: CrossMarginBalance1, CrossMarginBorrowable: CrossMarginBorrowable, CrossMarginCurrency: CrossMarginCurrency, CrossMarginLoan: CrossMarginLoan, @@ -342,6 +389,7 @@ const typeMap: { [index: string]: any } = { FlashSwapOrder: FlashSwapOrder, FlashSwapOrderPreview: FlashSwapOrderPreview, FlashSwapOrderRequest: FlashSwapOrderRequest, + FlashSwapPreviewRequest: FlashSwapPreviewRequest, FundingAccount: FundingAccount, FundingBookItem: FundingBookItem, FundingRateRecord: FundingRateRecord, @@ -375,8 +423,10 @@ const typeMap: { [index: string]: any } = { MarginBorrowable: MarginBorrowable, MarginCurrencyPair: MarginCurrencyPair, MarginTransferable: MarginTransferable, + MaxUniBorrowable: MaxUniBorrowable, MultiChainAddressItem: MultiChainAddressItem, MyFuturesTrade: MyFuturesTrade, + MyFuturesTradeTimeRange: MyFuturesTradeTimeRange, OpenOrders: OpenOrders, OptionsAccount: OptionsAccount, OptionsAccountBook: OptionsAccountBook, @@ -395,6 +445,7 @@ const typeMap: { [index: string]: any } = { Order: Order, OrderBook: OrderBook, OrderPatch: OrderPatch, + PatchUniLend: PatchUniLend, Position: Position, PositionClose: PositionClose, PositionCloseOrder: PositionCloseOrder, @@ -424,6 +475,15 @@ const typeMap: { [index: string]: any } = { Transfer: Transfer, TriggerOrderResponse: TriggerOrderResponse, TriggerTime: TriggerTime, + UniCurrency: UniCurrency, + UniCurrencyPair: UniCurrencyPair, + UniInterestRecord: UniInterestRecord, + UniLend: UniLend, + UniLendInterest: UniLendInterest, + UniLendRecord: UniLendRecord, + UniLoan: UniLoan, + UniLoanInterestRecord: UniLoanInterestRecord, + UniLoanRecord: UniLoanRecord, WithdrawStatus: WithdrawStatus, }; diff --git a/model/myFuturesTradeTimeRange.ts b/model/myFuturesTradeTimeRange.ts new file mode 100644 index 0000000..f63bee9 --- /dev/null +++ b/model/myFuturesTradeTimeRange.ts @@ -0,0 +1,119 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class MyFuturesTradeTimeRange { + /** + * Trade ID + */ + 'tradeId'?: string; + /** + * Trading time + */ + 'createTime'?: number; + /** + * Futures contract + */ + 'contract'?: string; + /** + * Order ID related + */ + 'orderId'?: string; + /** + * Trading size + */ + 'size'?: number; + /** + * Trading price + */ + 'price'?: string; + /** + * Trade role. Available values are `taker` and `maker` + */ + 'role'?: MyFuturesTradeTimeRange.Role; + /** + * User defined information + */ + 'text'?: string; + /** + * Fee deducted + */ + 'fee'?: string; + /** + * Points used to deduct fee + */ + 'pointFee'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'tradeId', + baseName: 'trade_id', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + { + name: 'contract', + baseName: 'contract', + type: 'string', + }, + { + name: 'orderId', + baseName: 'order_id', + type: 'string', + }, + { + name: 'size', + baseName: 'size', + type: 'number', + }, + { + name: 'price', + baseName: 'price', + type: 'string', + }, + { + name: 'role', + baseName: 'role', + type: 'MyFuturesTradeTimeRange.Role', + }, + { + name: 'text', + baseName: 'text', + type: 'string', + }, + { + name: 'fee', + baseName: 'fee', + type: 'string', + }, + { + name: 'pointFee', + baseName: 'point_fee', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return MyFuturesTradeTimeRange.attributeTypeMap; + } +} + +export namespace MyFuturesTradeTimeRange { + export enum Role { + Taker = 'taker', + Maker = 'maker', + } +} diff --git a/model/order.ts b/model/order.ts index 534bc10..2e2af18 100644 --- a/model/order.ts +++ b/model/order.ts @@ -21,6 +21,10 @@ export class Order { * User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - 101: from android - 102: from IOS - 103: from IPAD - 104: from webapp - 3: from web - 2: from apiv2 - apiv4: from apiv4 */ 'text'?: string; + /** + * The custom data that the user remarked when amending the order + */ + 'amendText'?: string; /** * Creation time of order */ @@ -133,6 +137,18 @@ export class Order { * Rebated fee currency unit */ 'rebatedFeeCurrency'?: string; + /** + * Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group` + */ + 'stpId'?: number; + /** + * Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user\'s self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use \'stp_act\' when placing the order, \'stp_act\' will return \'-\' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled + */ + 'stpAct'?: Order.StpAct; + /** + * How the order was finished. - open: processing - filled: filled totally - cancelled: manually cancelled - ioc: time in force is `IOC`, finish immediately - stp: cancelled because self trade prevention + */ + 'finishAs'?: Order.FinishAs; static discriminator: string | undefined = undefined; @@ -147,6 +163,11 @@ export class Order { baseName: 'text', type: 'string', }, + { + name: 'amendText', + baseName: 'amend_text', + type: 'string', + }, { name: 'createTime', baseName: 'create_time', @@ -287,6 +308,21 @@ export class Order { baseName: 'rebated_fee_currency', type: 'string', }, + { + name: 'stpId', + baseName: 'stp_id', + type: 'number', + }, + { + name: 'stpAct', + baseName: 'stp_act', + type: 'Order.StpAct', + }, + { + name: 'finishAs', + baseName: 'finish_as', + type: 'Order.FinishAs', + }, ]; static getAttributeTypeMap() { @@ -319,4 +355,17 @@ export namespace Order { Poc = 'poc', Fok = 'fok', } + export enum StpAct { + Cn = 'cn', + Co = 'co', + Cb = 'cb', + Minus = '-', + } + export enum FinishAs { + Open = 'open', + Filled = 'filled', + Cancelled = 'cancelled', + Ioc = 'ioc', + Stp = 'stp', + } } diff --git a/model/orderPatch.ts b/model/orderPatch.ts index f2b2521..45644f8 100644 --- a/model/orderPatch.ts +++ b/model/orderPatch.ts @@ -21,6 +21,10 @@ export class OrderPatch { * New order price. `amount` and `Price` must specify one of them\" */ 'price'?: string; + /** + * Custom info during amending order + */ + 'amendText'?: string; static discriminator: string | undefined = undefined; @@ -35,6 +39,11 @@ export class OrderPatch { baseName: 'price', type: 'string', }, + { + name: 'amendText', + baseName: 'amend_text', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/patchUniLend.ts b/model/patchUniLend.ts new file mode 100644 index 0000000..f68f837 --- /dev/null +++ b/model/patchUniLend.ts @@ -0,0 +1,40 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class PatchUniLend { + /** + * Currency name + */ + 'currency'?: string; + /** + * Minimum interest rate + */ + 'minRate'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'minRate', + baseName: 'min_rate', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return PatchUniLend.attributeTypeMap; + } +} diff --git a/model/position.ts b/model/position.ts index f6e1f3c..e570b50 100644 --- a/model/position.ts +++ b/model/position.ts @@ -96,7 +96,7 @@ export class Position { */ 'historyPoint'?: string; /** - * ADL ranking, ranging from 1 to 5 + * Ranking of auto deleveraging, a total of 1-5 grades, `1` is the highest, `5` is the lowest, and `6` is the special case when there is no position held or in liquidation */ 'adlRanking'?: number; /** diff --git a/model/subAccount.ts b/model/subAccount.ts index 53a2f39..29e9777 100644 --- a/model/subAccount.ts +++ b/model/subAccount.ts @@ -31,7 +31,7 @@ export class SubAccount { */ 'state'?: number; /** - * Type: 1-Sub-account + * \"Sub-account type: 1 - sub-account, 3 - cross margin account */ 'type'?: number; /** diff --git a/model/subAccountTransfer.ts b/model/subAccountTransfer.ts index 8098831..010cd62 100644 --- a/model/subAccountTransfer.ts +++ b/model/subAccountTransfer.ts @@ -39,7 +39,7 @@ export class SubAccountTransfer { */ 'source'?: string; /** - * Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account + * Target sub user\'s account. `spot` - spot account, `futures` - perpetual contract account, `cross_margin` - cross margin account, `delivery` - delivery account */ 'subAccountType'?: SubAccountTransfer.SubAccountType; @@ -102,5 +102,6 @@ export namespace SubAccountTransfer { Spot = 'spot', Futures = 'futures', CrossMargin = 'cross_margin', + Delivery = 'delivery', } } diff --git a/model/subCrossMarginAccount.ts b/model/subCrossMarginAccount.ts index da6462f..a5a731b 100644 --- a/model/subCrossMarginAccount.ts +++ b/model/subCrossMarginAccount.ts @@ -9,7 +9,7 @@ * Do not edit the class manually. */ -import { CrossMarginBalance } from './crossMarginBalance'; +import { CrossMarginBalance1 } from './crossMarginBalance1'; export class SubCrossMarginAccount { /** @@ -20,7 +20,7 @@ export class SubCrossMarginAccount { * Whether account is locked */ 'locked'?: boolean; - 'balances'?: { [key: string]: CrossMarginBalance }; + 'balances'?: { [key: string]: CrossMarginBalance1 }; /** * Total account value in USDT, i.e., the sum of all currencies\' `(available+freeze)*price*discount` */ @@ -90,7 +90,7 @@ export class SubCrossMarginAccount { { name: 'balances', baseName: 'balances', - type: '{ [key: string]: CrossMarginBalance; }', + type: '{ [key: string]: CrossMarginBalance1; }', }, { name: 'total', diff --git a/model/trade.ts b/model/trade.ts index 4dfe60e..3e11be2 100644 --- a/model/trade.ts +++ b/model/trade.ts @@ -62,6 +62,10 @@ export class Trade { * GT used to deduct fee. No value in public endpoints */ 'gtFee'?: string; + /** + * The custom data that the user remarked when amending the order + */ + 'amendText'?: string; static discriminator: string | undefined = undefined; @@ -131,6 +135,11 @@ export class Trade { baseName: 'gt_fee', type: 'string', }, + { + name: 'amendText', + baseName: 'amend_text', + type: 'string', + }, ]; static getAttributeTypeMap() { diff --git a/model/uniCurrency.ts b/model/uniCurrency.ts new file mode 100644 index 0000000..d0415bf --- /dev/null +++ b/model/uniCurrency.ts @@ -0,0 +1,70 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Currency detail + */ +export class UniCurrency { + /** + * Currency name + */ + 'currency'?: string; + /** + * Minimum lend amount + */ + 'minLendAmount'?: string; + /** + * Maximum lend amount + */ + 'maxLendAmount'?: string; + /** + * Maximum rate (Hourly) + */ + 'maxRate'?: string; + /** + * Minimum rate (Hourly) + */ + 'minRate'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'minLendAmount', + baseName: 'min_lend_amount', + type: 'string', + }, + { + name: 'maxLendAmount', + baseName: 'max_lend_amount', + type: 'string', + }, + { + name: 'maxRate', + baseName: 'max_rate', + type: 'string', + }, + { + name: 'minRate', + baseName: 'min_rate', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return UniCurrency.attributeTypeMap; + } +} diff --git a/model/uniCurrencyPair.ts b/model/uniCurrencyPair.ts new file mode 100644 index 0000000..3abb45b --- /dev/null +++ b/model/uniCurrencyPair.ts @@ -0,0 +1,61 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Currency pair of the loan + */ +export class UniCurrencyPair { + /** + * Currency pair + */ + 'currencyPair'?: string; + /** + * Minimum borrow amount of base currency + */ + 'baseMinBorrowAmount'?: string; + /** + * Minimum borrow amount of quote currency + */ + 'quoteMinBorrowAmount'?: string; + /** + * Position leverage + */ + 'leverage'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + { + name: 'baseMinBorrowAmount', + baseName: 'base_min_borrow_amount', + type: 'string', + }, + { + name: 'quoteMinBorrowAmount', + baseName: 'quote_min_borrow_amount', + type: 'string', + }, + { + name: 'leverage', + baseName: 'leverage', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return UniCurrencyPair.attributeTypeMap; + } +} diff --git a/model/uniInterestRecord.ts b/model/uniInterestRecord.ts new file mode 100644 index 0000000..2a0be0f --- /dev/null +++ b/model/uniInterestRecord.ts @@ -0,0 +1,70 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Interest Record + */ +export class UniInterestRecord { + /** + * Status: 0 - fail, 1 - success + */ + 'status'?: number; + /** + * Currency + */ + 'currency'?: string; + /** + * Actual Rate + */ + 'actualRate'?: string; + /** + * Interest + */ + 'interest'?: string; + /** + * Created time + */ + 'createTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'status', + baseName: 'status', + type: 'number', + }, + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'actualRate', + baseName: 'actual_rate', + type: 'string', + }, + { + name: 'interest', + baseName: 'interest', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniInterestRecord.attributeTypeMap; + } +} diff --git a/model/uniLend.ts b/model/uniLend.ts new file mode 100644 index 0000000..6df3096 --- /dev/null +++ b/model/uniLend.ts @@ -0,0 +1,97 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Loan record + */ +export class UniLend { + /** + * Currency + */ + 'currency'?: string; + /** + * Current amount + */ + 'currentAmount'?: string; + /** + * Total amount + */ + 'amount'?: string; + /** + * Lent amount + */ + 'lentAmount'?: string; + /** + * Frozen amount + */ + 'frozenAmount'?: string; + /** + * Minimum interest rate + */ + 'minRate'?: string; + /** + * Created time of the lending order + */ + 'createTime'?: number; + /** + * Upated time of the lending order + */ + 'updateTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'currentAmount', + baseName: 'current_amount', + type: 'string', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'lentAmount', + baseName: 'lent_amount', + type: 'string', + }, + { + name: 'frozenAmount', + baseName: 'frozen_amount', + type: 'string', + }, + { + name: 'minRate', + baseName: 'min_rate', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + { + name: 'updateTime', + baseName: 'update_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniLend.attributeTypeMap; + } +} diff --git a/model/uniLendInterest.ts b/model/uniLendInterest.ts new file mode 100644 index 0000000..5c0c26d --- /dev/null +++ b/model/uniLendInterest.ts @@ -0,0 +1,40 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +export class UniLendInterest { + /** + * Currency + */ + 'currency'?: string; + /** + * Interest + */ + 'interest'?: string; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'interest', + baseName: 'interest', + type: 'string', + }, + ]; + + static getAttributeTypeMap() { + return UniLendInterest.attributeTypeMap; + } +} diff --git a/model/uniLendRecord.ts b/model/uniLendRecord.ts new file mode 100644 index 0000000..cee78a8 --- /dev/null +++ b/model/uniLendRecord.ts @@ -0,0 +1,88 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Interest Record + */ +export class UniLendRecord { + /** + * Currency name + */ + 'currency'?: string; + /** + * current amount + */ + 'amount'?: string; + /** + * Last wallet amount + */ + 'lastWalletAmount'?: string; + /** + * Last lent amount + */ + 'lastLentAmount'?: string; + /** + * Last frozen amount + */ + 'lastFrozenAmount'?: string; + /** + * Record type: lend - lend, redeem - redeem + */ + 'type'?: string; + /** + * Created time + */ + 'createTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'lastWalletAmount', + baseName: 'last_wallet_amount', + type: 'string', + }, + { + name: 'lastLentAmount', + baseName: 'last_lent_amount', + type: 'string', + }, + { + name: 'lastFrozenAmount', + baseName: 'last_frozen_amount', + type: 'string', + }, + { + name: 'type', + baseName: 'type', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniLendRecord.attributeTypeMap; + } +} diff --git a/model/uniLoan.ts b/model/uniLoan.ts new file mode 100644 index 0000000..3fd995c --- /dev/null +++ b/model/uniLoan.ts @@ -0,0 +1,70 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Loan + */ +export class UniLoan { + /** + * Currency + */ + 'currency'?: string; + /** + * Currency pair + */ + 'currencyPair'?: string; + /** + * amount + */ + 'amount'?: string; + /** + * Created time + */ + 'createTime'?: number; + /** + * Updated time + */ + 'updateTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + { + name: 'updateTime', + baseName: 'update_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniLoan.attributeTypeMap; + } +} diff --git a/model/uniLoanInterestRecord.ts b/model/uniLoanInterestRecord.ts new file mode 100644 index 0000000..9f4e55f --- /dev/null +++ b/model/uniLoanInterestRecord.ts @@ -0,0 +1,79 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Interest record + */ +export class UniLoanInterestRecord { + /** + * Currency name + */ + 'currency'?: string; + /** + * Currency pair + */ + 'currencyPair'?: string; + /** + * Actual rate + */ + 'actualRate'?: string; + /** + * Interest + */ + 'interest'?: string; + /** + * Status: 0 - fail, 1 - success + */ + 'status'?: number; + /** + * Created time + */ + 'createTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + { + name: 'actualRate', + baseName: 'actual_rate', + type: 'string', + }, + { + name: 'interest', + baseName: 'interest', + type: 'string', + }, + { + name: 'status', + baseName: 'status', + type: 'number', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniLoanInterestRecord.attributeTypeMap; + } +} diff --git a/model/uniLoanRecord.ts b/model/uniLoanRecord.ts new file mode 100644 index 0000000..136263d --- /dev/null +++ b/model/uniLoanRecord.ts @@ -0,0 +1,70 @@ +/** + * Gate API v4 + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. + * + * Contact: support@mail.gate.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +/** + * Loan record + */ +export class UniLoanRecord { + /** + * type: borrow - borrow, repay - repay + */ + 'type'?: string; + /** + * Currency pair + */ + 'currencyPair'?: string; + /** + * Currency + */ + 'currency'?: string; + /** + * The amount of lending or repaying + */ + 'amount'?: string; + /** + * Created time + */ + 'createTime'?: number; + + static discriminator: string | undefined = undefined; + + static attributeTypeMap: Array<{ name: string; baseName: string; type: string }> = [ + { + name: 'type', + baseName: 'type', + type: 'string', + }, + { + name: 'currencyPair', + baseName: 'currency_pair', + type: 'string', + }, + { + name: 'currency', + baseName: 'currency', + type: 'string', + }, + { + name: 'amount', + baseName: 'amount', + type: 'string', + }, + { + name: 'createTime', + baseName: 'create_time', + type: 'number', + }, + ]; + + static getAttributeTypeMap() { + return UniLoanRecord.attributeTypeMap; + } +} diff --git a/package-lock.json b/package-lock.json index 6363eba..87f5ecd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gate-api", - "version": "5.40.0", - "lockfileVersion": 2, + "version": "5.45.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gate-api", - "version": "5.40.0", + "version": "5.45.0", "license": "Unlicense", "dependencies": { "@types/node": "^8.10.48", @@ -1609,9 +1609,9 @@ } }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -1736,9 +1736,9 @@ } }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2042,1539 +2042,5 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", - "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "strip-json-comments": "^3.1.1" - } - }, - "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.0", - "debug": "^4.1.1", - "minimatch": "^3.0.4" - } - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/node": { - "version": "8.10.66", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", - "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" - }, - "@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" - } - }, - "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", - "dev": true, - "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, - "acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-colors": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", - "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, - "babel-core": { - "version": "6.26.3", - "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", - "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-generator": "^6.26.0", - "babel-helpers": "^6.24.1", - "babel-messages": "^6.23.0", - "babel-register": "^6.26.0", - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "convert-source-map": "^1.5.1", - "debug": "^2.6.9", - "json5": "^0.5.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.4", - "path-is-absolute": "^1.0.1", - "private": "^0.1.8", - "slash": "^1.0.0", - "source-map": "^0.5.7" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "babel-generator": { - "version": "6.26.1", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", - "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", - "dev": true, - "requires": { - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "detect-indent": "^4.0.0", - "jsesc": "^1.3.0", - "lodash": "^4.17.4", - "source-map": "^0.5.7", - "trim-right": "^1.0.1" - } - }, - "babel-helpers": { - "version": "6.24.1", - "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", - "integrity": "sha512-n7pFrqQm44TCYvrCDb0MqabAF+JUBq+ijBvNMUxpkLjJaAu32faIexewMumrH5KLLJ1HDyT0PTEqRyAe/GwwuQ==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "babel-template": "^6.24.1" - } - }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-plugin-transform-es2015-block-scoping": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", - "integrity": "sha512-YiN6sFAQ5lML8JjCmr7uerS5Yc/EMbgg9G8ZNmk2E3nYX4ckHR01wrkeeMijEf5WHNK5TW0Sl0Uu3pv3EdOJWw==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-template": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "lodash": "^4.17.4" - } - }, - "babel-register": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", - "integrity": "sha512-veliHlHX06wjaeY8xNITbveXSiI+ASFnOqvne/LaIJIqOWi2Ogmj91KOugEz/hoh/fwMhXNBJPCv8Xaz5CyM4A==", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-runtime": "^6.26.0", - "core-js": "^2.5.0", - "home-or-tmp": "^2.0.0", - "lodash": "^4.17.4", - "mkdirp": "^0.5.1", - "source-map-support": "^0.4.15" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-template": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", - "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "babel-traverse": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "lodash": "^4.17.4" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "detect-indent": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", - "integrity": "sha512-BDKtmHlOzwI7iRuEkhzsnPoi5ypEhWAJB5RvHWe1kMr06js3uK5B3734i3ui5Yd+wOJV1cpE4JnivPD283GU/A==", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", - "dev": true, - "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "enquirer": "^2.3.5", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", - "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, - "eslint-config-prettier": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", - "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", - "dev": true, - "requires": { - "get-stdin": "^6.0.0" - } - }, - "eslint-plugin-prettier": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz", - "integrity": "sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g==", - "dev": true, - "requires": { - "prettier-linter-helpers": "^1.0.0" - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - }, - "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", - "dev": true, - "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - } - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "home-or-tmp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", - "integrity": "sha512-ycURW7oUxE2sNiPVw1HVEFsW+ecOpJ5zaj7eC0RlwhibhRBod20muUN8qu/gzx956YrLolVvs1MTXwKgC2rVEg==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.1" - } - }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha512-Mke0DA0QjUWuJlhsE0ZPPhYiJkRap642SmI/4ztCFaUs6V2AiH1sfecc+57NgaryfAA2VR3v6O+CSjC1jZJKOA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha512-4xrs1aW+6N5DalkqSVA8fxh458CXvR99WU8WLKmq4v8eWAL86Xo3BVqyd3SkA9wEVjCMqyvvRRkshAdOnBp5rw==", - "dev": true - }, - "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true - }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true - }, - "prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", - "dev": true - }, - "prettier-linter-helpers": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", - "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", - "dev": true, - "requires": { - "fast-diff": "^1.1.2" - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - }, - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rewire": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rewire/-/rewire-3.0.2.tgz", - "integrity": "sha512-ejkkt3qYnsQ38ifc9llAAzuHiGM7kR8N5/mL3aHWgmWwet0OMFcmJB8aTsMV2PBHCWxNVTLCeRfBpEa8X2+1fw==", - "dev": true, - "requires": { - "babel-core": "^6.26.0", - "babel-plugin-transform-es2015-block-scoping": "^6.26.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - }, - "source-map-support": { - "version": "0.4.18", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", - "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", - "dev": true, - "requires": { - "source-map": "^0.5.6" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - } - } - }, - "text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", - "dev": true - }, - "trim-right": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", - "integrity": "sha512-WZGXGstmCWgeevgTL54hrCuw1dyMQIzWy7ZfqRJfSmJZBwklI15egmQytFP6bPidmw3M8d5yEowl1niq4vmqZw==", - "dev": true - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "requires": { - "prelude-ls": "^1.2.1" - } - }, - "type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true - }, - "typescript": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", - "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - } } } diff --git a/package.json b/package.json index af15252..c0b362d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gate-api", - "version": "5.40.0", + "version": "5.45.0", "description": "NodeJS client for gate-api", "repository": "gateio/gateapi-nodejs", "main": "dist/api.js",