Skip to main content

Account Trades

Description

Return every fill the caller participated in as either maker or taker, newest first. Each row is from the caller's perspective: side reflects whether the caller was buying or selling, and fee / fee_token are the fee the caller paid.

HTTP Request

GET /spot/trades/me (JWT or API Key)

Weight

0 — order endpoints are not subject to per-IP weight limits.

Request Parameters

NameTypeRequiredDescription
symbolSTRINGNOFilter to a single market (e.g. DFUSDT). Case-sensitive. Omit to return fills across all markets.
startLONGNOReturn trades with timestamp >= start (unix seconds).
endLONGNOReturn trades with timestamp <= end (unix seconds).
limitNUMBERNONumber of records to return. Default 50; maximum 200. Values outside this range are clamped server-side.

Response Example

200 OK

[
{
"trade_id": "3e761331-0cec-481c-81be-f62ab572757b",
"symbol": "DFUSDT",
"side": "buy",
"price": "0.4990",
"quantity": "30",
"fee": "0",
"fee_token": "DF",
"role": "taker",
"order_id": "9f2a1c4e-5b67-4d8a-bf93-2e1f4a6c8d10",
"ts": 1778400090
},
{
"trade_id": "7c8d9e0f-abcd-1234-ef56-789012345678",
"symbol": "DFUSDT",
"side": "sell",
"price": "0.6000",
"quantity": "50",
"fee": "0",
"fee_token": "USDT",
"role": "maker",
"order_id": "a1b2c3d4-1234-5678-abcd-ef0123456789",
"ts": 1778400060
}
]
FieldNotes
trade_idServer-generated UUID uniquely identifying this fill event.
sideThe caller's side at this fill (buy or sell). This is not the global taker side — a maker's side is the opposite of the taker's direction.
priceMatched price as a string.
quantityBase quantity filled in this event as a string.
feeFee paid by the caller at this fill. MVP fees are "0"; field is populated for forward compatibility.
fee_tokenToken in which the fee was charged: DF if the caller received base (i.e. side=buy), USDT if the caller received quote (i.e. side=sell).
rolemaker — caller's order was resting on the book; taker — caller's order initiated the cross. See Trade Role.
order_idUUID of the caller's order that participated in this fill. Use with Query Order to get the full order state.
tsFill timestamp as unix seconds. Results are ordered by ts descending (newest first).

Error Responses

HTTPerrorWhen
500DB_ERRORServer fault.

Full list: Error Codes.

Code Examples

cURL (JWT)

JWT="your_jwt_token"

# Most recent 50 fills across all markets
curl -s "https://api-sepolia.p99.world/api/v1/spot/trades/me" \
-H "Authorization: Bearer ${JWT}"

# Last 10 DFUSDT fills
curl -s "https://api-sepolia.p99.world/api/v1/spot/trades/me?symbol=DFUSDT&limit=10" \
-H "Authorization: Bearer ${JWT}"

cURL (HMAC API Key)

API_KEY="your_api_key"
API_SECRET="your_api_secret"
TIMESTAMP=$(date +%s%3N)
QUERY="symbol=DFUSDT&limit=10&timestamp=${TIMESTAMP}"
SIGNATURE=$(echo -n "${QUERY}" | openssl dgst -sha256 -hmac "${API_SECRET}" | awk '{print $2}')

curl -s \
-H "X-MBX-APIKEY: ${API_KEY}" \
"https://api-sepolia.p99.world/api/v1/spot/trades/me?${QUERY}&signature=${SIGNATURE}"

Python

import time, hmac, hashlib, requests
from urllib.parse import urlencode

API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
BASE_URL = "https://api-sepolia.p99.world/api/v1"

def signed_get(path: str, params: dict = None) -> list | dict:
ts = int(time.time() * 1000)
qs_params = {**(params or {}), "timestamp": ts}
qs = urlencode(qs_params)
sig = hmac.new(API_SECRET.encode(), qs.encode(), hashlib.sha256).hexdigest()
r = requests.get(
f"{BASE_URL}{path}?{qs}&signature={sig}",
headers={"X-MBX-APIKEY": API_KEY},
timeout=5,
)
r.raise_for_status()
return r.json()

# Fetch recent fills for DFUSDT
trades = signed_get("/spot/trades/me", {"symbol": "DFUSDT", "limit": 50})
print(f"{len(trades)} trade(s)")
for t in trades:
print(
f" {t['trade_id']} {t['role']:6} {t['side']:4}"
f" {t['quantity']:>10} @ {t['price']} fee={t['fee']} {t['fee_token']}"
)

# Summarize realized volume by side
buys = sum(float(t["quantity"]) for t in trades if t["side"] == "buy")
sells = sum(float(t["quantity"]) for t in trades if t["side"] == "sell")
print(f"Bought {buys} DF, Sold {sells} DF")