List transactions
curl --request GET \
--url http://localhost:2101/v1/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2101/v1/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2101/v1/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_PORT => "2101",
CURLOPT_URL => "http://localhost:2101/v1/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 := "http://localhost:2101/v1/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("http://localhost:2101/v1/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2101/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "message for success",
"pagination": {
"current_entries_size": 20,
"next_cursor": "MjAyNC0xMC0xNVQxMTowNTo1My45NTkxNDErMDE6MDA=",
"previous_cursor": "MjAyNC0xMC0xNVQxMDowNTo1My45NTIxQjE3MDE6MDA="
},
"data": [
{
"id": "platform_123456",
"object": "transaction",
"status": "completed",
"created_at": "2024-05-16T13:06:31.409336+01:00",
"reference": "ORD_7ain6FEDWB",
"user_id": "platform_123456",
"profile_id": "platform_123456",
"type": "buys",
"description": "Bought US Dollar",
"sub_description": "With USD Token",
"amount": "100",
"currency": "BTC",
"is_fiat": true,
"is_credit": true,
"status_description": "This has been processed by Busha",
"meta": {
"price": {
"amount": "100",
"currency": "<string>"
},
"balance": {
"total": "100",
"available": "100"
},
"conversion": {
"source_currency": "<string>",
"source_amount": "100",
"target_currency": "<string>",
"target_amount": "100",
"rate": "100",
"rate_explained": "<string>"
},
"source": {
"type": "bank_transfer",
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"session_id": "<string>"
},
"destination": {
"type": "bank_transfer",
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"session_id": "<string>"
},
"savings": {
"action": "deposit",
"id": "<string>"
},
"service": {
"type": "airtime",
"provider": "<string>",
"phone_number": "<string>",
"network": "<string>",
"merchant": "<string>",
"amount": "100"
},
"fee": {
"amount": "100",
"currency": "<string>"
},
"amounts": {
"fee": "100",
"amount_paid": "100",
"amount_added": "100"
}
}
}
]
}Transactions
List transactions
Returns a list of transactions
GET
/
v1
/
transactions
List transactions
curl --request GET \
--url http://localhost:2101/v1/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:2101/v1/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:2101/v1/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_PORT => "2101",
CURLOPT_URL => "http://localhost:2101/v1/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 := "http://localhost:2101/v1/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("http://localhost:2101/v1/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:2101/v1/transactions")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "message for success",
"pagination": {
"current_entries_size": 20,
"next_cursor": "MjAyNC0xMC0xNVQxMTowNTo1My45NTkxNDErMDE6MDA=",
"previous_cursor": "MjAyNC0xMC0xNVQxMDowNTo1My45NTIxQjE3MDE6MDA="
},
"data": [
{
"id": "platform_123456",
"object": "transaction",
"status": "completed",
"created_at": "2024-05-16T13:06:31.409336+01:00",
"reference": "ORD_7ain6FEDWB",
"user_id": "platform_123456",
"profile_id": "platform_123456",
"type": "buys",
"description": "Bought US Dollar",
"sub_description": "With USD Token",
"amount": "100",
"currency": "BTC",
"is_fiat": true,
"is_credit": true,
"status_description": "This has been processed by Busha",
"meta": {
"price": {
"amount": "100",
"currency": "<string>"
},
"balance": {
"total": "100",
"available": "100"
},
"conversion": {
"source_currency": "<string>",
"source_amount": "100",
"target_currency": "<string>",
"target_amount": "100",
"rate": "100",
"rate_explained": "<string>"
},
"source": {
"type": "bank_transfer",
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"session_id": "<string>"
},
"destination": {
"type": "bank_transfer",
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"session_id": "<string>"
},
"savings": {
"action": "deposit",
"id": "<string>"
},
"service": {
"type": "airtime",
"provider": "<string>",
"phone_number": "<string>",
"network": "<string>",
"merchant": "<string>",
"amount": "100"
},
"fee": {
"amount": "100",
"currency": "<string>"
},
"amounts": {
"fee": "100",
"amount_paid": "100",
"amount_added": "100"
}
}
}
]
}Authorizations
Bearer Authentication
Headers
User profile header
Example:
"BUS_YOK8tp5Zga01qOKEsqp07"
Query Parameters
The order to sort the results
Available options:
asc, desc Example:
"asc"
Filter by currency
Filter by fiat currencies
Filter by transactions that are credit
Filter by history ID
Example:
"EPL_FjgpvrhBW2VF"
Special preconfigured filters that override other filter parameters when used. Used to filter specific transaction scenarios. Available filters:
trim_fiat_from_trades: Excludes fiat transactions from trade-related transactions
Available options:
trim_fiat_from_trades Example:
"trim_fiat_from_trades"
Filter transactions by type
transaction type
Available options:
buys, sells, converts, utilities, rewards, loans, savings, savings.withdrawals, savings.deposit, savings.interests, deposits, withdrawals, sends, receives The cursor
The number of items to return
Example:
10