curl --request GET \
--url 'https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active' \
--header 'Authorization: Bearer <token>'
{
"status": "success",
"message": "Orders gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"orders": [
{
"price": 5,
"amount": 20,
"type": "Buy",
"owner_model": "api_key",
"status": "Active",
"_id": "62436d93dddca3004ba4b1fe",
"user": "62424e97d1e7590032dc7ed0",
"token": {
"price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 10
},
"max": {
"buy": 0,
"sell": 10
},
"vol": {
"buy": 0,
"sell": 60
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Public",
"deal_access": "Private",
"raise_amount": 5000000,
"buy_fee": 0.5,
"sell_fee": 0.5,
"valuation": 200000000,
"secondaries": true,
"completed_raise": true,
"supply": 500000,
"total_supply": 20000000,
"total_raised": 0,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"esop_token": false,
"_id": "61e82728af0adf0d01ae7237",
"reference": 3435575,
"name": "Getequity Token",
"image": "test.png",
"symbol": "GQY",
"asset": "61e8250706f78f0cf3e558bd",
"creator": null,
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"api_customer_email": "ruger@yopmail.com",
"meta": {
"tokens": 2
},
"createdAt": "2022-03-29T20:35:31.490Z",
"updatedAt": "2022-03-29T20:35:31.490Z"
}
]
},
"meta": {
"page": 1,
"limit": 20,
"sort": "-createdAt",
"totalDocs": 1,
"totalPages": 1,
"hasPrevPage": false,
"hasNextPage": false,
"offset": 0,
"prevPage": null,
"nextPage": null
}
}
Fetch all active buy orders
curl --request GET \
--url 'https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active' \
--header 'Authorization: Bearer <token>'
{
"status": "success",
"message": "Orders gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"orders": [
{
"price": 5,
"amount": 20,
"type": "Buy",
"owner_model": "api_key",
"status": "Active",
"_id": "62436d93dddca3004ba4b1fe",
"user": "62424e97d1e7590032dc7ed0",
"token": {
"price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 10
},
"max": {
"buy": 0,
"sell": 10
},
"vol": {
"buy": 0,
"sell": 60
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Public",
"deal_access": "Private",
"raise_amount": 5000000,
"buy_fee": 0.5,
"sell_fee": 0.5,
"valuation": 200000000,
"secondaries": true,
"completed_raise": true,
"supply": 500000,
"total_supply": 20000000,
"total_raised": 0,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"esop_token": false,
"_id": "61e82728af0adf0d01ae7237",
"reference": 3435575,
"name": "Getequity Token",
"image": "test.png",
"symbol": "GQY",
"asset": "61e8250706f78f0cf3e558bd",
"creator": null,
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"api_customer_email": "ruger@yopmail.com",
"meta": {
"tokens": 2
},
"createdAt": "2022-03-29T20:35:31.490Z",
"updatedAt": "2022-03-29T20:35:31.490Z"
}
]
},
"meta": {
"page": 1,
"limit": 20,
"sort": "-createdAt",
"totalDocs": 1,
"totalPages": 1,
"hasPrevPage": false,
"hasNextPage": false,
"offset": 0,
"prevPage": null,
"nextPage": null
}
}
{
"status": "success",
"message": "Orders gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"orders": [
{
"price": 5,
"amount": 20,
"type": "Buy",
"owner_model": "api_key",
"status": "Active",
"_id": "62436d93dddca3004ba4b1fe",
"user": "62424e97d1e7590032dc7ed0",
"token": {
"price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 10
},
"max": {
"buy": 0,
"sell": 10
},
"vol": {
"buy": 0,
"sell": 60
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Public",
"deal_access": "Private",
"raise_amount": 5000000,
"buy_fee": 0.5,
"sell_fee": 0.5,
"valuation": 200000000,
"secondaries": true,
"completed_raise": true,
"supply": 500000,
"total_supply": 20000000,
"total_raised": 0,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"esop_token": false,
"_id": "61e82728af0adf0d01ae7237",
"reference": 3435575,
"name": "Getequity Token",
"image": "test.png",
"symbol": "GQY",
"asset": "61e8250706f78f0cf3e558bd",
"creator": null,
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"api_customer_email": "ruger@yopmail.com",
"meta": {
"tokens": 2
},
"createdAt": "2022-03-29T20:35:31.490Z",
"updatedAt": "2022-03-29T20:35:31.490Z"
}
]
},
"meta": {
"page": 1,
"limit": 20,
"sort": "-createdAt",
"totalDocs": 1,
"totalPages": 1,
"hasPrevPage": false,
"hasNextPage": false,
"offset": 0,
"prevPage": null,
"nextPage": null
}
}
Was this page helpful?