bufflogin
bufflogin copied to clipboard
How to create sell order?
I try to create sell order. I log in to the site as in the example. .is_alive_session() specifies true. But when I try to create request, I get the error:
{
"code": "CSRF Verification Error",
"error": "\u0421\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438\u0441\u0442\u0435\u043a, \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443",
"extra": null
}
Code for creating a request for sale:
async def create_sell_offer(buff: Buff):
url = 'https://buff.163.com/api/market/sell_order/create/manual_plus'
params = """{"game": "csgo", "assets": [
{"game": "csgo", "market_hash_name": "Snakebite Case", "contextid": 2, "assetid": "30175988177",
"classid": "4418618853", "instanceid": "0", "goods_id": 857515, "price": 10, "income": 9.75,
"has_market_min_price": False, "cdkey_id": ""}]}"""
response = await buff.request(url, method='POST', params=params)
print(response)