-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
I have written a function that passes a set of values to a dictionary and posts to the addOrder endpoint. However, I always receive the following response from the endpoint:
b'{"data":{"internal_order_id":"0"},"notifications":[]}'
Function
`
def makeOrder(self, auth_id, exch_id, mkt_id, order_type_id, price_type_id, limit_price, order_quantity):
headers = {
'Content-Type': 'application/json',
'X-API-KEY': self.APIKEY,
'X-API-SECRET': self.APISECRET,
}
values = {
"auth_id": int(auth_id),
"exch_id": int(exch_id),
"mkt_id": int(mkt_id),
"order_type_id": int(order_type_id),
"price_type_id": int(price_type_id),
"limit_price": int(limit_price),
"order_quantity": float(order_quantity),
}
print(values)
request = requests.post('https://api.coinigy.com/api/v1/addOrder', json=values, headers=headers)
logging.debug(request.content)
print(request.content)
return request.json()['data']['internal_order_id']`
Here is a sample dictionary:
{'mkt_id': 3341, 'limit_price': 3603.78, 'order_quantity': 0.001, 'auth_id': 396720, 'price_type_id': 3, 'order_type_id': 2, 'exch_id': 70}
Has anyone encountered this?
Metadata
Metadata
Assignees
Labels
No labels