All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
ListUniCurrencies | GET /earn/uni/currencies | List currencies for lending |
GetUniCurrency | GET /earn/uni/currencies/{currency} | Get currency detail for lending |
ListUserUniLends | GET /earn/uni/lends | List user's lending orders |
CreateUniLend | POST /earn/uni/lends | Lend or redeem |
ChangeUniLend | PATCH /earn/uni/lends | Amend lending order |
ListUniLendRecords | GET /earn/uni/lend_records | List records of lending |
GetUniInterest | GET /earn/uni/interests/{currency} | Get the user's total interest income of specified currency |
ListUniInterestRecords | GET /earn/uni/interest_records | List interest records |
SwitchInterestReinvest | PUT /earn/uni/interest_reinvest | Set interest reinvestment toggle |
GetUniInterestStatus | GET /earn/uni/interest_status/{currency} | query currency interest compounding status |
List<UniCurrency> ListUniCurrencies ()
List currencies for lending
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 ListUniCurrenciesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new EarnUniApi(config);
try
{
// List currencies for lending
List<UniCurrency> result = apiInstance.ListUniCurrencies();
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.ListUniCurrencies: " + 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]
UniCurrency GetUniCurrency (string currency)
Get currency detail for lending
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 GetUniCurrencyExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new EarnUniApi(config);
var currency = "btc"; // string | Currency
try
{
// Get currency detail for lending
UniCurrency result = apiInstance.GetUniCurrency(currency);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.GetUniCurrency: " + 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 | Currency |
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]
List<UniLend> ListUserUniLends (string currency = null, int? page = null, int? limit = null)
List user's lending orders
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 ListUserUniLendsExample
{
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 EarnUniApi(config);
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 user's lending orders
List<UniLend> result = apiInstance.ListUserUniLends(currency, page, limit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.ListUserUniLends: " + 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 | [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 CreateUniLend (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.
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 CreateUniLendExample
{
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 EarnUniApi(config);
var createUniLend = new CreateUniLend(); // CreateUniLend |
try
{
// Lend or redeem
apiInstance.CreateUniLend(createUniLend);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.CreateUniLend: " + 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 |
---|---|---|---|
createUniLend | CreateUniLend |
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]
void ChangeUniLend (PatchUniLend patchUniLend)
Amend lending order
Currently only supports amending the minimum interest rate (hour)
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 ChangeUniLendExample
{
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 EarnUniApi(config);
var patchUniLend = new PatchUniLend(); // PatchUniLend |
try
{
// Amend lending order
apiInstance.ChangeUniLend(patchUniLend);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.ChangeUniLend: " + 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 |
---|---|---|---|
patchUniLend | PatchUniLend |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Updated | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<UniLendRecord> ListUniLendRecords (string currency = null, int? page = null, int? limit = null, long? from = null, long? to = null, string type = null)
List records of lending
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 ListUniLendRecordsExample
{
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 EarnUniApi(config);
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)
var from = 1547706332; // long? | Start timestamp (optional)
var to = 1547706332; // long? | End timestamp (optional)
var type = "lend"; // string | type: lend - lend, redeem - redeem (optional)
try
{
// List records of lending
List<UniLendRecord> result = apiInstance.ListUniLendRecords(currency, page, limit, from, to, type);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.ListUniLendRecords: " + 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 | [optional] |
page | int? | Page number | [optional] [default to 1] |
limit | int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [optional] [default to 100] |
from | long? | Start timestamp | [optional] |
to | long? | End timestamp | [optional] |
type | string | type: lend - lend, redeem - redeem | [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]
UniLendInterest GetUniInterest (string currency)
Get the user's total interest income of specified currency
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 GetUniInterestExample
{
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 EarnUniApi(config);
var currency = "btc"; // string | Currency
try
{
// Get the user's total interest income of specified currency
UniLendInterest result = apiInstance.GetUniInterest(currency);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.GetUniInterest: " + 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 | Currency |
- 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<UniInterestRecord> ListUniInterestRecords (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 ListUniInterestRecordsExample
{
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 EarnUniApi(config);
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)
var from = 1547706332; // long? | Start timestamp (optional)
var to = 1547706332; // long? | End timestamp (optional)
try
{
// List interest records
List<UniInterestRecord> result = apiInstance.ListUniInterestRecords(currency, page, limit, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.ListUniInterestRecords: " + 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 | [optional] |
page | int? | Page number | [optional] [default to 1] |
limit | int? | Maximum response items. Default: 100, minimum: 1, Maximum: 100 | [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]
void SwitchInterestReinvest (UniInterestMode uniInterestMode)
Set interest reinvestment toggle
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 SwitchInterestReinvestExample
{
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 EarnUniApi(config);
var uniInterestMode = new UniInterestMode(); // UniInterestMode |
try
{
// Set interest reinvestment toggle
apiInstance.SwitchInterestReinvest(uniInterestMode);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.SwitchInterestReinvest: " + 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 |
---|---|---|---|
uniInterestMode | UniInterestMode |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
204 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UniCurrencyInterest GetUniInterestStatus (string currency)
query currency interest compounding status
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 GetUniInterestStatusExample
{
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 EarnUniApi(config);
var currency = "btc"; // string | Currency
try
{
// query currency interest compounding status
UniCurrencyInterest result = apiInstance.GetUniInterestStatus(currency);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling EarnUniApi.GetUniInterestStatus: " + 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 | Currency |
- 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]