[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
810 lines (635 loc) · 28.1 KB

MultiCollateralLoanApi.md

File metadata and controls

810 lines (635 loc) · 28.1 KB

Io.Gate.GateApi.Api.MultiCollateralLoanApi

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

Method HTTP request Description
ListMultiCollateralOrders GET /loan/multi_collateral/orders List Multi-Collateral Orders
CreateMultiCollateral POST /loan/multi_collateral/orders Create Multi-Collateral Order
GetMultiCollateralOrderDetail GET /loan/multi_collateral/orders/{order_id} Get Multi-Collateral Order Detail
ListMultiRepayRecords GET /loan/multi_collateral/repay List Multi-Collateral Repay Records
RepayMultiCollateralLoan POST /loan/multi_collateral/repay Repay Multi-Collateral Loan
ListMultiCollateralRecords GET /loan/multi_collateral/mortgage Query collateral adjustment records
OperateMultiCollateral POST /loan/multi_collateral/mortgage Operate Multi-Collateral
ListUserCurrencyQuota GET /loan/multi_collateral/currency_quota List User Currency Quota
ListMultiCollateralCurrencies GET /loan/multi_collateral/currencies Query supported borrowing and collateral currencies in Multi-Collateral
GetMultiCollateralLtv GET /loan/multi_collateral/ltv Get Multi-Collateral ratio
GetMultiCollateralFixRate GET /loan/multi_collateral/fixed_rate Query fixed interest rates for the currency for 7 days and 30 days

ListMultiCollateralOrders

List<MultiCollateralOrder> ListMultiCollateralOrders (int? page = null, int? limit = null, string sort = null, string orderType = null)

List Multi-Collateral Orders

Example

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 ListMultiCollateralOrdersExample
    {
        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 MultiCollateralLoanApi(config);
            var page = 1;  // int? | Page number (optional)  (default to 1)
            var limit = 10;  // int? | Maximum number of records to be returned in a single list (optional)  (default to 10)
            var sort = "ltv_asc";  // string | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. (optional) 
            var orderType = "current";  // string | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders (optional) 

            try
            {
                // List Multi-Collateral Orders
                List<MultiCollateralOrder> result = apiInstance.ListMultiCollateralOrders(page, limit, sort, orderType);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.ListMultiCollateralOrders: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Page number [optional] [default to 1]
limit int? Maximum number of records to be returned in a single list [optional] [default to 10]
sort string Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. [optional]
orderType string Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders [optional]

Return type

List<MultiCollateralOrder>

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 List retrieved -

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

CreateMultiCollateral

OrderResp CreateMultiCollateral (CreateMultiCollateralOrder createMultiCollateralOrder)

Create Multi-Collateral Order

Example

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 CreateMultiCollateralExample
    {
        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 MultiCollateralLoanApi(config);
            var createMultiCollateralOrder = new CreateMultiCollateralOrder(); // CreateMultiCollateralOrder | 

            try
            {
                // Create Multi-Collateral Order
                OrderResp result = apiInstance.CreateMultiCollateral(createMultiCollateralOrder);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.CreateMultiCollateral: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
createMultiCollateralOrder CreateMultiCollateralOrder

Return type

OrderResp

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -

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

GetMultiCollateralOrderDetail

MultiCollateralOrder GetMultiCollateralOrderDetail (string orderId)

Get Multi-Collateral Order Detail

Example

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 GetMultiCollateralOrderDetailExample
    {
        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 MultiCollateralLoanApi(config);
            var orderId = "12345";  // string | Order ID returned on successful order creation

            try
            {
                // Get Multi-Collateral Order Detail
                MultiCollateralOrder result = apiInstance.GetMultiCollateralOrderDetail(orderId);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.GetMultiCollateralOrderDetail: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
orderId string Order ID returned on successful order creation

Return type

MultiCollateralOrder

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Success -

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

ListMultiRepayRecords

List<MultiRepayRecord> ListMultiRepayRecords (string type, string borrowCurrency = null, int? page = null, int? limit = null, long? from = null, long? to = null)

List Multi-Collateral Repay Records

Example

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 ListMultiRepayRecordsExample
    {
        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 MultiCollateralLoanApi(config);
            var type = "repay";  // string | Operation type: repay - Regular repayment, liquidate - Liquidation
            var borrowCurrency = "USDT";  // string | Borrowed currency (optional) 
            var page = 1;  // int? | Page number (optional)  (default to 1)
            var limit = 10;  // int? | Maximum number of records to be returned in a single list (optional)  (default to 10)
            var from = 1609459200;  // long? | Start timestamp of the query (optional) 
            var to = 1609459200;  // long? | Time range ending, default to current time (optional) 

            try
            {
                // List Multi-Collateral Repay Records
                List<MultiRepayRecord> result = apiInstance.ListMultiRepayRecords(type, borrowCurrency, page, limit, from, to);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.ListMultiRepayRecords: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
type string Operation type: repay - Regular repayment, liquidate - Liquidation
borrowCurrency string Borrowed 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 10]
from long? Start timestamp of the query [optional]
to long? Time range ending, default to current time [optional]

Return type

List<MultiRepayRecord>

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

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

RepayMultiCollateralLoan

MultiRepayResp RepayMultiCollateralLoan (RepayMultiLoan repayMultiLoan)

Repay Multi-Collateral Loan

Example

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 RepayMultiCollateralLoanExample
    {
        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 MultiCollateralLoanApi(config);
            var repayMultiLoan = new RepayMultiLoan(); // RepayMultiLoan | 

            try
            {
                // Repay Multi-Collateral Loan
                MultiRepayResp result = apiInstance.RepayMultiCollateralLoan(repayMultiLoan);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.RepayMultiCollateralLoan: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
repayMultiLoan RepayMultiLoan

Return type

MultiRepayResp

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Operated successfully -

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

ListMultiCollateralRecords

List<MultiCollateralRecord> ListMultiCollateralRecords (int? page = null, int? limit = null, long? from = null, long? to = null, string collateralCurrency = null)

Query collateral adjustment records

Example

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 ListMultiCollateralRecordsExample
    {
        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 MultiCollateralLoanApi(config);
            var page = 1;  // int? | Page number (optional)  (default to 1)
            var limit = 10;  // int? | Maximum number of records to be returned in a single list (optional)  (default to 10)
            var from = 1609459200;  // long? | Start timestamp of the query (optional) 
            var to = 1609459200;  // long? | Time range ending, default to current time (optional) 
            var collateralCurrency = "BTC";  // string | Collateral (optional) 

            try
            {
                // Query collateral adjustment records
                List<MultiCollateralRecord> result = apiInstance.ListMultiCollateralRecords(page, limit, from, to, collateralCurrency);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.ListMultiCollateralRecords: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Page number [optional] [default to 1]
limit int? Maximum number of records to be returned in a single list [optional] [default to 10]
from long? Start timestamp of the query [optional]
to long? Time range ending, default to current time [optional]
collateralCurrency string Collateral [optional]

Return type

List<MultiCollateralRecord>

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 List retrieved -

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

OperateMultiCollateral

CollateralAdjustRes OperateMultiCollateral (CollateralAdjust collateralAdjust)

Operate Multi-Collateral

Example

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 OperateMultiCollateralExample
    {
        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 MultiCollateralLoanApi(config);
            var collateralAdjust = new CollateralAdjust(); // CollateralAdjust | 

            try
            {
                // Operate Multi-Collateral
                CollateralAdjustRes result = apiInstance.OperateMultiCollateral(collateralAdjust);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.OperateMultiCollateral: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
collateralAdjust CollateralAdjust

Return type

CollateralAdjustRes

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Operated successfully -

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

ListUserCurrencyQuota

List<CurrencyQuota> ListUserCurrencyQuota (string type, string currency)

List User Currency Quota

Example

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 ListUserCurrencyQuotaExample
    {
        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 MultiCollateralLoanApi(config);
            var type = "collateral";  // string | Currency types: collateral - collateral currency, borrow - borrowing currency.
            var currency = "BTC";  // string | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided.

            try
            {
                // List User Currency Quota
                List<CurrencyQuota> result = apiInstance.ListUserCurrencyQuota(type, currency);
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.ListUserCurrencyQuota: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
type string Currency types: collateral - collateral currency, borrow - borrowing currency.
currency string When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided.

Return type

List<CurrencyQuota>

Authorization

apiv4

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

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

ListMultiCollateralCurrencies

MultiCollateralCurrency ListMultiCollateralCurrencies ()

Query supported borrowing and collateral currencies in Multi-Collateral

Example

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 ListMultiCollateralCurrenciesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gateio.ws/api/v4";
            var apiInstance = new MultiCollateralLoanApi(config);

            try
            {
                // Query supported borrowing and collateral currencies in Multi-Collateral 
                MultiCollateralCurrency result = apiInstance.ListMultiCollateralCurrencies();
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.ListMultiCollateralCurrencies: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

MultiCollateralCurrency

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

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

GetMultiCollateralLtv

CollateralLtv GetMultiCollateralLtv ()

Get Multi-Collateral ratio

The Multi-Collateral ratio is fixed, irrespective of the currency.

Example

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 GetMultiCollateralLtvExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gateio.ws/api/v4";
            var apiInstance = new MultiCollateralLoanApi(config);

            try
            {
                // Get Multi-Collateral ratio
                CollateralLtv result = apiInstance.GetMultiCollateralLtv();
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.GetMultiCollateralLtv: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

CollateralLtv

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

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

GetMultiCollateralFixRate

List<CollateralFixRate> GetMultiCollateralFixRate ()

Query fixed interest rates for the currency for 7 days and 30 days

Example

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 GetMultiCollateralFixRateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.gateio.ws/api/v4";
            var apiInstance = new MultiCollateralLoanApi(config);

            try
            {
                // Query fixed interest rates for the currency for 7 days and 30 days
                List<CollateralFixRate> result = apiInstance.GetMultiCollateralFixRate();
                Debug.WriteLine(result);
            }
            catch (GateApiException e)
            {
                Debug.Print("Exception when calling MultiCollateralLoanApi.GetMultiCollateralFixRate: " + e.Message);
                Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List<CollateralFixRate>

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

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