Skip to main content

Closed Orders

Endpoint

GET /closed-orders

Parameters

ParameterTypeRequiredDescription
fromint64YesStart of the time range (timestamp in milliseconds).
toint64YesEnd of the time range (timestamp in milliseconds).
skipint32YesNumber of orders to skip (for pagination).
takeint32YesNumber of orders to retrieve. Maximum is 100.

Headers

HeaderTypeRequiredDescription
session-tokenstringYesAuthorization token.
api-keystringYesAPI key for user authentication.

Note: You must provide either session-token or api-key in the headers for authentication.

Response

JSON Array of Objects


Response Fields

FieldTypeDescription
ostringOrder ID.
gstringLinked Order ID.
sstringSymbol name (e.g., ETH_USDT).
pstringLimit Price.
cstringStop Price.
vstringSize of the order (amount of base currency).
bstringBudget (amount of quote currency).
fstringFilled amount (amount of base currency already matched).
qstringPurchased amount (amount of quote currency already bought/sold).
aint32Order Action
tint32Order Type
eint32Original Order Type
rint32Order Status
ustringUser ID.
wstringCreated time (timestamp in milliseconds).
dstringLast updated time (timestamp in milliseconds).
zstringTrigger time (timestamp in milliseconds).
hint32Trigger Direction

Example Usage

curl --location 'https://spot-markets.goonus.io/closed-orders?from=1700779038486&to=1830779038486&skip=0&take=10' \
--header 'session-token: xxx'

Response Example

[
{
"o": "7217339258215330666",
"s": "ETH_USDT",
"p": "1.0000000",
"v": "0.170",
"b": "",
"f": "",
"q": "",
"a": 1,
"t": 0,
"r": 0,
"u": "1",
"w": "1720747770838",
"d": "1720747770838"
},
{
"o": "7217339023736825805",
"s": "ETH_USDT",
"p": "4.0000000",
"v": "0.010",
"b": "",
"f": "",
"q": "",
"a": 0,
"t": 0,
"r": 0,
"u": "1",
"w": "1720747714936",
"d": "1720747714936"
},
{
"o": "7217339067281847805",
"s": "ETH_USDT",
"p": "5.0000000",
"v": "0.130",
"b": "",
"f": "",
"q": "",
"a": 0,
"t": 0,
"r": 0,
"u": "1",
"w": "1720747725318",
"d": "1720747725318"
}
]