Skip to content

Commit 3565e5c

Browse files
committed
add loan fee rate
1 parent ecd5a4e commit 3565e5c

5 files changed

Lines changed: 93 additions & 6 deletions

File tree

docs/CurrencyPair.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**fee** | **str** | Trading fee | [optional]
1010
**min_base_amount** | **str** | Minimum amount of base currency to trade, `null` means no limit | [optional]
1111
**min_quote_amount** | **str** | Minimum amount of quote currency to trade, `null` means no limit | [optional]
12+
**amount_precision** | **int** | Amount scale | [optional]
1213
**precision** | **int** | Price scale | [optional]
1314

1415
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Loan.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Name | Type | Description | Notes
1818
**repaid** | **str** | Repaid amount | [optional]
1919
**paid_interest** | **str** | Repaid interest | [optional]
2020
**unpaid_interest** | **str** | Interest not repaid | [optional]
21+
**fee_rate** | **str** | Loan fee rate | [optional]
22+
**orig_id** | **str** | Original loan ID if the loan is auto-renewed. Equal to `id` if not | [optional]
2123

2224
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2325

docs/SpotApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ configuration.secret = 'YOUR_API_SECRET'
144144

145145
# create an instance of the API class
146146
api_instance = gate_api.SpotApi(gate_api.ApiClient(configuration))
147-
order = [] # list[Order] |
147+
order = [gate_api.Order()] # list[Order] |
148148

149149
try:
150150
# Create a batch of orders
@@ -158,7 +158,7 @@ except ApiException as e:
158158

159159
Name | Type | Description | Notes
160160
------------- | ------------- | ------------- | -------------
161-
**order** | [**list[Order]**](list.md)| |
161+
**order** | [**list[Order]**](Order.md)| |
162162

163163
### Return type
164164

gate_api/models/currency_pair.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class CurrencyPair(object):
3737
'fee': 'str',
3838
'min_base_amount': 'str',
3939
'min_quote_amount': 'str',
40+
'amount_precision': 'int',
4041
'precision': 'int'
4142
}
4243

@@ -47,10 +48,11 @@ class CurrencyPair(object):
4748
'fee': 'fee',
4849
'min_base_amount': 'min_base_amount',
4950
'min_quote_amount': 'min_quote_amount',
51+
'amount_precision': 'amount_precision',
5052
'precision': 'precision'
5153
}
5254

53-
def __init__(self, id=None, base=None, quote=None, fee=None, min_base_amount=None, min_quote_amount=None, precision=None): # noqa: E501
55+
def __init__(self, id=None, base=None, quote=None, fee=None, min_base_amount=None, min_quote_amount=None, amount_precision=None, precision=None): # noqa: E501
5456
"""CurrencyPair - a model defined in OpenAPI""" # noqa: E501
5557

5658
self._id = None
@@ -59,6 +61,7 @@ def __init__(self, id=None, base=None, quote=None, fee=None, min_base_amount=Non
5961
self._fee = None
6062
self._min_base_amount = None
6163
self._min_quote_amount = None
64+
self._amount_precision = None
6265
self._precision = None
6366
self.discriminator = None
6467

@@ -74,6 +77,8 @@ def __init__(self, id=None, base=None, quote=None, fee=None, min_base_amount=Non
7477
self.min_base_amount = min_base_amount
7578
if min_quote_amount is not None:
7679
self.min_quote_amount = min_quote_amount
80+
if amount_precision is not None:
81+
self.amount_precision = amount_precision
7782
if precision is not None:
7883
self.precision = precision
7984

@@ -215,6 +220,29 @@ def min_quote_amount(self, min_quote_amount):
215220

216221
self._min_quote_amount = min_quote_amount
217222

223+
@property
224+
def amount_precision(self):
225+
"""Gets the amount_precision of this CurrencyPair. # noqa: E501
226+
227+
Amount scale # noqa: E501
228+
229+
:return: The amount_precision of this CurrencyPair. # noqa: E501
230+
:rtype: int
231+
"""
232+
return self._amount_precision
233+
234+
@amount_precision.setter
235+
def amount_precision(self, amount_precision):
236+
"""Sets the amount_precision of this CurrencyPair.
237+
238+
Amount scale # noqa: E501
239+
240+
:param amount_precision: The amount_precision of this CurrencyPair. # noqa: E501
241+
:type: int
242+
"""
243+
244+
self._amount_precision = amount_precision
245+
218246
@property
219247
def precision(self):
220248
"""Gets the precision of this CurrencyPair. # noqa: E501

gate_api/models/loan.py

Lines changed: 59 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ class Loan(object):
4545
'left': 'str',
4646
'repaid': 'str',
4747
'paid_interest': 'str',
48-
'unpaid_interest': 'str'
48+
'unpaid_interest': 'str',
49+
'fee_rate': 'str',
50+
'orig_id': 'str'
4951
}
5052

5153
attribute_map = {
@@ -63,10 +65,12 @@ class Loan(object):
6365
'left': 'left',
6466
'repaid': 'repaid',
6567
'paid_interest': 'paid_interest',
66-
'unpaid_interest': 'unpaid_interest'
68+
'unpaid_interest': 'unpaid_interest',
69+
'fee_rate': 'fee_rate',
70+
'orig_id': 'orig_id'
6771
}
6872

69-
def __init__(self, id=None, create_time=None, expire_time=None, status=None, side=None, currency=None, rate=None, amount=None, days=None, auto_renew=False, currency_pair=None, left=None, repaid=None, paid_interest=None, unpaid_interest=None): # noqa: E501
73+
def __init__(self, id=None, create_time=None, expire_time=None, status=None, side=None, currency=None, rate=None, amount=None, days=None, auto_renew=False, currency_pair=None, left=None, repaid=None, paid_interest=None, unpaid_interest=None, fee_rate=None, orig_id=None): # noqa: E501
7074
"""Loan - a model defined in OpenAPI""" # noqa: E501
7175

7276
self._id = None
@@ -84,6 +88,8 @@ def __init__(self, id=None, create_time=None, expire_time=None, status=None, sid
8488
self._repaid = None
8589
self._paid_interest = None
8690
self._unpaid_interest = None
91+
self._fee_rate = None
92+
self._orig_id = None
8793
self.discriminator = None
8894

8995
if id is not None:
@@ -112,6 +118,10 @@ def __init__(self, id=None, create_time=None, expire_time=None, status=None, sid
112118
self.paid_interest = paid_interest
113119
if unpaid_interest is not None:
114120
self.unpaid_interest = unpaid_interest
121+
if fee_rate is not None:
122+
self.fee_rate = fee_rate
123+
if orig_id is not None:
124+
self.orig_id = orig_id
115125

116126
@property
117127
def id(self):
@@ -478,6 +488,52 @@ def unpaid_interest(self, unpaid_interest):
478488

479489
self._unpaid_interest = unpaid_interest
480490

491+
@property
492+
def fee_rate(self):
493+
"""Gets the fee_rate of this Loan. # noqa: E501
494+
495+
Loan fee rate # noqa: E501
496+
497+
:return: The fee_rate of this Loan. # noqa: E501
498+
:rtype: str
499+
"""
500+
return self._fee_rate
501+
502+
@fee_rate.setter
503+
def fee_rate(self, fee_rate):
504+
"""Sets the fee_rate of this Loan.
505+
506+
Loan fee rate # noqa: E501
507+
508+
:param fee_rate: The fee_rate of this Loan. # noqa: E501
509+
:type: str
510+
"""
511+
512+
self._fee_rate = fee_rate
513+
514+
@property
515+
def orig_id(self):
516+
"""Gets the orig_id of this Loan. # noqa: E501
517+
518+
Original loan ID if the loan is auto-renewed. Equal to `id` if not # noqa: E501
519+
520+
:return: The orig_id of this Loan. # noqa: E501
521+
:rtype: str
522+
"""
523+
return self._orig_id
524+
525+
@orig_id.setter
526+
def orig_id(self, orig_id):
527+
"""Sets the orig_id of this Loan.
528+
529+
Original loan ID if the loan is auto-renewed. Equal to `id` if not # noqa: E501
530+
531+
:param orig_id: The orig_id of this Loan. # noqa: E501
532+
:type: str
533+
"""
534+
535+
self._orig_id = orig_id
536+
481537
def to_dict(self):
482538
"""Returns the model properties as a dict"""
483539
result = {}

0 commit comments

Comments
 (0)