Get Token
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId}"
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/api/token/{tokenId}', 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/api/token/{tokenId}",
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/api/token/{tokenId}"
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/api/token/{tokenId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId}")
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": "Token gotten successfully.",
"data": {
"price": {
"buy": 1,
"sell": 1,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 0
},
"max": {
"buy": 0,
"sell": 0
},
"vol": {
"buy": 0,
"sell": 0
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Private",
"deal_access": "Private",
"investment_type": "SAFE",
"investment_category": "Commercial Paper",
"payout_frequency": "Monthly",
"raise_amount": 0,
"buy_fee": 2,
"sell_fee": 2,
"carry": 10,
"management_fee": 1,
"valuation": 0,
"discount": 0,
"interest": 0,
"dividend": 0,
"tenor": 0,
"secondaries": true,
"completed_raise": false,
"supply": 5000000000,
"total_supply": 0,
"total_raised": 0,
"exited": false,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"cancelled": false,
"_id": "659597a28bd0f62d7168c4c8",
"name": "GetEquity NGN Token",
"reference": 222222222,
"image": "https://i.ibb.co/4jDtPr5/Logomark.png",
"symbol": "GNGN",
"creator": null,
"createdAt": "2024-01-03T17:21:38.821Z",
"updatedAt": "2024-01-03T17:21:38.821Z",
"currency": "NGN",
"percentage": 0
}
}
Trade
Get Token
Fetch a specific token by its ID
GET
api
/
token
/
{tokenId}
Get Token
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId}"
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/api/token/{tokenId}', 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/api/token/{tokenId}",
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/api/token/{tokenId}"
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/api/token/{tokenId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/token/{tokenId}")
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": "Token gotten successfully.",
"data": {
"price": {
"buy": 1,
"sell": 1,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 0
},
"max": {
"buy": 0,
"sell": 0
},
"vol": {
"buy": 0,
"sell": 0
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Private",
"deal_access": "Private",
"investment_type": "SAFE",
"investment_category": "Commercial Paper",
"payout_frequency": "Monthly",
"raise_amount": 0,
"buy_fee": 2,
"sell_fee": 2,
"carry": 10,
"management_fee": 1,
"valuation": 0,
"discount": 0,
"interest": 0,
"dividend": 0,
"tenor": 0,
"secondaries": true,
"completed_raise": false,
"supply": 5000000000,
"total_supply": 0,
"total_raised": 0,
"exited": false,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"cancelled": false,
"_id": "659597a28bd0f62d7168c4c8",
"name": "GetEquity NGN Token",
"reference": 222222222,
"image": "https://i.ibb.co/4jDtPr5/Logomark.png",
"symbol": "GNGN",
"creator": null,
"createdAt": "2024-01-03T17:21:38.821Z",
"updatedAt": "2024-01-03T17:21:38.821Z",
"currency": "NGN",
"percentage": 0
}
}
The ID of the token to fetch
{
"status": "success",
"message": "Token gotten successfully.",
"data": {
"price": {
"buy": 1,
"sell": 1,
"exchange": 10
},
"prev_price": {
"buy": 10,
"sell": 10,
"exchange": 10
},
"min": {
"buy": 0,
"sell": 0
},
"max": {
"buy": 0,
"sell": 0
},
"vol": {
"buy": 0,
"sell": 0
},
"min_trade": {
"buy": 10,
"sell": 10
},
"max_trade": {
"buy": 10,
"sell": 10
},
"type": "Private",
"deal_access": "Private",
"investment_type": "SAFE",
"investment_category": "Commercial Paper",
"payout_frequency": "Monthly",
"raise_amount": 0,
"buy_fee": 2,
"sell_fee": 2,
"carry": 10,
"management_fee": 1,
"valuation": 0,
"discount": 0,
"interest": 0,
"dividend": 0,
"tenor": 0,
"secondaries": true,
"completed_raise": false,
"supply": 5000000000,
"total_supply": 0,
"total_raised": 0,
"exited": false,
"post_raise_valuation": 0,
"milestone": "0",
"total_allocated": 0,
"cancelled": false,
"_id": "659597a28bd0f62d7168c4c8",
"name": "GetEquity NGN Token",
"reference": 222222222,
"image": "https://i.ibb.co/4jDtPr5/Logomark.png",
"symbol": "GNGN",
"creator": null,
"createdAt": "2024-01-03T17:21:38.821Z",
"updatedAt": "2024-01-03T17:21:38.821Z",
"currency": "NGN",
"percentage": 0
}
}
Was this page helpful?
⌘I
