All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
ListUniCurrencyPairs | GET /margin/uni/currency_pairs | List lending markets |
GetUniCurrencyPair | GET /margin/uni/currency_pairs/{currency_pair} | Get detail of lending market |
GetMarginUniEstimateRate | GET /margin/uni/estimate_rate | Estimate interest Rate |
ListUniLoans | GET /margin/uni/loans | List loans |
CreateUniLoan | POST /margin/uni/loans | Borrow or repay |
ListUniLoanRecords | GET /margin/uni/loan_records | Get load records |
ListUniLoanInterestRecords | GET /margin/uni/interest_records | List interest records |
GetUniBorrowable | GET /margin/uni/borrowable | Get maximum borrowable |
List<UniCurrencyPair> ListUniCurrencyPairs ()
List lending markets
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListUniCurrencyPairsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new MarginUniApi(config);
try
{
// List lending markets
List<UniCurrencyPair> result = apiInstance.ListUniCurrencyPairs();
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.ListUniCurrencyPairs: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UniCurrencyPair GetUniCurrencyPair (string currencyPair)
Get detail of lending market
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetUniCurrencyPairExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new MarginUniApi(config);
var currencyPair = "AE_USDT"; // string | Currency pair
try
{
// Get detail of lending market
UniCurrencyPair result = apiInstance.GetUniCurrencyPair(currencyPair);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.GetUniCurrencyPair: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currencyPair | string | Currency pair |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Dictionary<string, string> GetMarginUniEstimateRate (List currencies)
Estimate interest Rate
Please note that the interest rates are subject to change based on the borrowing and lending demand, and therefore, the provided rates may not be entirely accurate.
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetMarginUniEstimateRateExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var currencies = new List<string>(); // List<string> | An array of up to 10 specifying the currency name
try
{
// Estimate interest Rate
Dictionary<string, string> result = apiInstance.GetMarginUniEstimateRate(currencies);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.GetMarginUniEstimateRate: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currencies | List<string> | An array of up to 10 specifying the currency name |
Dictionary<string, string>
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<UniLoan> ListUniLoans (string currencyPair = null, string currency = null, int? page = null, int? limit = null)
List loans
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListUniLoansExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var currencyPair = "BTC_USDT"; // string | Currency pair (optional)
var currency = "BTC"; // string | Retrieve data of the specified currency (optional)
var page = 1; // int? | Page number (optional) (default to 1)
var limit = 100; // int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
try
{
// List loans
List<UniLoan> result = apiInstance.ListUniLoans(currencyPair, currency, page, limit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.ListUniLoans: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currencyPair | string | Currency pair | [optional] |
currency | string | Retrieve data of the specified currency | [optional] |
page | int? | Page number | [optional] [default to 1] |
limit | int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void CreateUniLoan (CreateUniLoan createUniLoan)
Borrow or repay
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class CreateUniLoanExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var createUniLoan = new CreateUniLoan(); // CreateUniLoan |
try
{
// Borrow or repay
apiInstance.CreateUniLoan(createUniLoan);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.CreateUniLoan: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createUniLoan | CreateUniLoan |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Operated successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<UniLoanRecord> ListUniLoanRecords (string type = null, string currency = null, string currencyPair = null, int? page = null, int? limit = null)
Get load records
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListUniLoanRecordsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var type = "type_example"; // string | type: borrow - borrow, repay - repay (optional)
var currency = "BTC"; // string | Retrieve data of the specified currency (optional)
var currencyPair = "BTC_USDT"; // string | Currency pair (optional)
var page = 1; // int? | Page number (optional) (default to 1)
var limit = 100; // int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 (optional) (default to 100)
try
{
// Get load records
List<UniLoanRecord> result = apiInstance.ListUniLoanRecords(type, currency, currencyPair, page, limit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.ListUniLoanRecords: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
type | string | type: borrow - borrow, repay - repay | [optional] |
currency | string | Retrieve data of the specified currency | [optional] |
currencyPair | string | Currency pair | [optional] |
page | int? | Page number | [optional] [default to 1] |
limit | int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<UniLoanInterestRecord> ListUniLoanInterestRecords (string currencyPair = null, string currency = null, int? page = null, int? limit = null, long? from = null, long? to = null)
List interest records
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListUniLoanInterestRecordsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var currencyPair = "BTC_USDT"; // string | Currency pair (optional)
var currency = "BTC"; // string | Retrieve data of the specified currency (optional)
var page = 1; // int? | Page number (optional) (default to 1)
var limit = 100; // int? | Maximum number of records to be returned in a single list (optional) (default to 100)
var from = 1547706332; // long? | Start timestamp (optional)
var to = 1547706332; // long? | End timestamp (optional)
try
{
// List interest records
List<UniLoanInterestRecord> result = apiInstance.ListUniLoanInterestRecords(currencyPair, currency, page, limit, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.ListUniLoanInterestRecords: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currencyPair | string | Currency pair | [optional] |
currency | string | Retrieve data of the specified currency | [optional] |
page | int? | Page number | [optional] [default to 1] |
limit | int? | Maximum number of records to be returned in a single list | [optional] [default to 100] |
from | long? | Start timestamp | [optional] |
to | long? | End timestamp | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MaxUniBorrowable GetUniBorrowable (string currency, string currencyPair)
Get maximum borrowable
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetUniBorrowableExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new MarginUniApi(config);
var currency = "BTC"; // string | Retrieve data of the specified currency
var currencyPair = "BTC_USDT"; // string | Currency pair
try
{
// Get maximum borrowable
MaxUniBorrowable result = apiInstance.GetUniBorrowable(currency, currencyPair);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling MarginUniApi.GetUniBorrowable: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | Retrieve data of the specified currency | |
currencyPair | string | Currency pair |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]