forked from astranome/PAYEER_API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLimites.py
39 lines (28 loc) · 984 Bytes
/
Limites.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
---ASTRA RESEARCH---
API client for PAYEER trading
Example "ticker24"
"""
import requests
import time
import json
pair = "DOGE_USD"
ts = int(round(time.time()*1000))
ts=str(ts)
#print(ts)
values =json.dumps ({"pair": pair})
headers = {'Content-Type': 'application/json'}
#print(headers)
res = requests.request(method='POST', url='https://payeer.com/api/trade/info', data=values, headers=headers)
#print(res.text)
current_rates = json.loads(res.text)
print (current_rates)
min_amount=float(current_rates['pairs'][pair]['min_amount'])
min_value=float(current_rates['pairs'][pair]['min_value'])
fee_maker_percent=float(current_rates['pairs'][pair]['fee_maker_percent'])
fee_taker_percent=float(current_rates['pairs'][pair]['fee_taker_percent'])
print('Limits for ', pair)
print('min_amount=', min_amount)
print('min_value =', min_value)
print('fee_maker_percent =', fee_maker_percent)
print('fee_taker_percent =', fee_taker_percent)