Fetch 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>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}
}
Orders
Fetch Active Buy Orders
Fetch all active buy orders
GET
orders
/
token
/
{id}
?type=buy&status=Active
Fetch 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>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/orders/token/{id}?type=buy&status=Active")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}
}
The ID of the 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
}
}
Was this page helpful?
⌘I
