working aster triggers extend

This commit is contained in:
2026-04-28 22:40:35 +00:00
parent 7d55712278
commit 8f3f7c6667
7 changed files with 12021 additions and 998 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "3a269644",
"metadata": {},
"outputs": [],
@@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"id": "4395fabb",
"metadata": {},
"outputs": [],
@@ -71,52 +71,59 @@
" \"method\": \"POST\",\n",
" \"params\": {\n",
" 'symbol': 'ETHUSDT',\n",
" 'side': 'SELL',\n",
" 'side': 'BUY',\n",
" 'type': 'LIMIT',\n",
" 'timeInForce': 'GTC',\n",
" 'timeInForce': 'GTX',\n",
" 'quantity': '0.01',\n",
" 'price': '2500',\n",
" 'price': '2300',\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "2122885a",
"metadata": {},
"outputs": [],
"source": [
"j = await aster_auth.post_authenticated_url(fut_acct_positionRisk)\n"
"j = await aster_auth.post_authenticated_url(post_order)\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"id": "e895ac52",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'symbol': 'ETHUSDT',\n",
" 'positionAmt': '-0.214',\n",
" 'entryPrice': '2327.21',\n",
" 'markPrice': '2326.46000000',\n",
" 'unRealizedProfit': '0.16050000',\n",
" 'liquidationPrice': '2444.20070305',\n",
" 'leverage': '150',\n",
" 'maxNotionalValue': '300000',\n",
" 'marginType': 'cross',\n",
" 'isolatedMargin': '0.00000000',\n",
" 'isAutoAddMargin': 'false',\n",
" 'positionSide': 'BOTH',\n",
" 'notional': '-497.86244000',\n",
" 'isolatedWallet': '0',\n",
" 'updateTime': 1777182273777}]"
"{'orderId': 17365320734,\n",
" 'symbol': 'ETHUSDT',\n",
" 'status': 'NEW',\n",
" 'clientOrderId': 'RlTsi93X2Qe75bMt2vzC5v',\n",
" 'price': '2300',\n",
" 'avgPrice': '0.00000',\n",
" 'origQty': '0.010',\n",
" 'executedQty': '0',\n",
" 'cumQty': '0',\n",
" 'cumQuote': '0',\n",
" 'timeInForce': 'GTX',\n",
" 'type': 'LIMIT',\n",
" 'reduceOnly': False,\n",
" 'closePosition': False,\n",
" 'side': 'BUY',\n",
" 'positionSide': 'BOTH',\n",
" 'stopPrice': '0',\n",
" 'workingType': 'CONTRACT_PRICE',\n",
" 'priceProtect': False,\n",
" 'origType': 'LIMIT',\n",
" 'updateTime': 1777411299750,\n",
" 'newChainData': {'hash': '0x43deac455e5dc6c77576c7dd21b1c3d1d5d5d6745a30300ddef0a18fc41fa0a3'}}"
]
},
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}