Fetch Customer Transactions
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions"
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/customers/transactions', 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/customers/transactions",
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/customers/transactions"
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/customers/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions")
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": "Transactions gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"transactions": [
{
"type": "Buy",
"status": "Completed",
"_id": "6242d09fdb07f7043620188f",
"user": "62424e97d1e7590032dc7ed0",
"reference": "GETXN_TKN_BUY_WOBJhNoJT",
"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": "61e805cf85f4e60ca4d437b8",
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"from": "61e805cf85f4e60ca4d437b8",
"to": "62424e97d1e7590032dc7ed0",
"volume": 20,
"price": 10,
"owner_model": "api_key",
"meta": {
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"meta": {
"tokens": 2
}
},
"api_customer_email": "ruger@yopmail.com",
"createdAt": "2022-03-29T09:25:53.097Z",
"updatedAt": "2022-03-29T09:25:53.097Z",
"organisation": "61e805cf85f4e60ca4d437b8",
"__v": 0
}
]
}
}
Transactions
Fetch Customer Transactions
Fetch all transactions for a customer by customer’s email
GET
api
/
customers
/
transactions
Fetch Customer Transactions
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions"
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/customers/transactions', 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/customers/transactions",
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/customers/transactions"
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/customers/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/customers/transactions")
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": "Transactions gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"transactions": [
{
"type": "Buy",
"status": "Completed",
"_id": "6242d09fdb07f7043620188f",
"user": "62424e97d1e7590032dc7ed0",
"reference": "GETXN_TKN_BUY_WOBJhNoJT",
"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": "61e805cf85f4e60ca4d437b8",
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"from": "61e805cf85f4e60ca4d437b8",
"to": "62424e97d1e7590032dc7ed0",
"volume": 20,
"price": 10,
"owner_model": "api_key",
"meta": {
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"meta": {
"tokens": 2
}
},
"api_customer_email": "ruger@yopmail.com",
"createdAt": "2022-03-29T09:25:53.097Z",
"updatedAt": "2022-03-29T09:25:53.097Z",
"organisation": "61e805cf85f4e60ca4d437b8",
"__v": 0
}
]
}
}
Customer’s email
Transaction type mmust be either
Buy or Sell{
"status": "success",
"message": "Transactions gotten successfully",
"data": {
"page": 1,
"pages": 1,
"count": 1,
"total": 1,
"transactions": [
{
"type": "Buy",
"status": "Completed",
"_id": "6242d09fdb07f7043620188f",
"user": "62424e97d1e7590032dc7ed0",
"reference": "GETXN_TKN_BUY_WOBJhNoJT",
"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": "61e805cf85f4e60ca4d437b8",
"request": "61e8257906f78f0cf3e558d4",
"createdAt": "2022-01-19T14:58:48.669Z",
"updatedAt": "2022-03-29T09:25:53.092Z"
},
"from": "61e805cf85f4e60ca4d437b8",
"to": "62424e97d1e7590032dc7ed0",
"volume": 20,
"price": 10,
"owner_model": "api_key",
"meta": {
"customer": {
"name": "Ruger Client",
"email": "ruger@yopmail.com"
},
"meta": {
"tokens": 2
}
},
"api_customer_email": "ruger@yopmail.com",
"createdAt": "2022-03-29T09:25:53.097Z",
"updatedAt": "2022-03-29T09:25:53.097Z",
"organisation": "61e805cf85f4e60ca4d437b8",
"__v": 0
}
]
}
}
Was this page helpful?
⌘I
