0

Я пытаюсь разместить заказ на продажу токена https://tradeogre.com/help/api. В документации сказано что нужно составить запрос след.образом:

Submit Sell Order
Method (POST)
/order/sell
POST Fields
market quantity price
Submit a sell order to the order book for a market. The success status will be false if there is an error, and error will contain the error message. Your available buy and sell balance for the market will be returned if successful. If your order is successful but not fully fulfilled, the order is placed onto the order book and you will receive a uuid for the order.

Я составляю запрос на python:

params = {
            'market': 'BTC-SIN',
            'price': price,
            'quantity': quantity
        }
        response = requests.post(uri='https://tradeogre.com/api/v1/order/sell', method='post', params=params)

Аутентификация проходит успешно но биржа возвращает {'success': False, 'error': 'Invalid market'} как будто бы я не правильно передаю параметры. Подскажите где я ошибаюсь?

1
  • В API данные POST отправляются как form-* или json?
    – gil9red
    26 фев 2020 в 9:48

1 ответ 1

1

Данные формы нужно передавать в data, а не в params.

См. документацию к requests.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.