curl --request GET \
--url https://public-api-v2.bags.fm/api/v1/bags-payout/token/events \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api-v2.bags.fm/api/v1/bags-payout/token/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api-v2.bags.fm/api/v1/bags-payout/token/events', 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://public-api-v2.bags.fm/api/v1/bags-payout/token/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://public-api-v2.bags.fm/api/v1/bags-payout/token/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api-v2.bags.fm/api/v1/bags-payout/token/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api-v2.bags.fm/api/v1/bags-payout/token/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"events": [
{
"paymentId": "0x8f3c2b7e1d4a5f6e9c0b1a2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f",
"payoutId": "6720f1c2a9b3e45d7f8a1b2c",
"tokenMint": "CyXBDcVQuHyEDbG661Jf3iHqxyd9wNHhE2SiQdNrBAGS",
"cashoutMethod": "venmo",
"username": "rebeccaperrotto",
"displayHandle": "@rebeccaperrotto",
"amountUsd": 786.04,
"fiatPaidCents": "78604",
"usdcAmount": "45746116",
"usdcDecimals": 6,
"discountBps": 1000,
"timestamp": 1794040000,
"isFirstPayment": true
}
],
"hasMore": true
}
}{
"success": false,
"response": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"response": "<string>"
}{
"success": false,
"response": "<string>"
}Get Bags Payout Token Events
The payment events of one token, for example to draw markers on its price chart. An event is one completed end-to-end send: a Peer fill the buyer paid and that was released with verified cash. Only X Money payments are returned unless method says otherwise.
Offset Mode (default): use mode=offset (or omit mode) with limit and offset. Events are ordered newest first.
Time Mode: use mode=time with from and to unix timestamps (both inclusive and required). Events are ordered oldest first (chart order), up to 1000 events; hasMore is true when the range holds more.
Sending offset parameters in time mode, or time parameters in offset mode, is rejected with 400.
curl --request GET \
--url https://public-api-v2.bags.fm/api/v1/bags-payout/token/events \
--header 'x-api-key: <api-key>'import requests
url = "https://public-api-v2.bags.fm/api/v1/bags-payout/token/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://public-api-v2.bags.fm/api/v1/bags-payout/token/events', 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://public-api-v2.bags.fm/api/v1/bags-payout/token/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://public-api-v2.bags.fm/api/v1/bags-payout/token/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://public-api-v2.bags.fm/api/v1/bags-payout/token/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api-v2.bags.fm/api/v1/bags-payout/token/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"response": {
"events": [
{
"paymentId": "0x8f3c2b7e1d4a5f6e9c0b1a2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f",
"payoutId": "6720f1c2a9b3e45d7f8a1b2c",
"tokenMint": "CyXBDcVQuHyEDbG661Jf3iHqxyd9wNHhE2SiQdNrBAGS",
"cashoutMethod": "venmo",
"username": "rebeccaperrotto",
"displayHandle": "@rebeccaperrotto",
"amountUsd": 786.04,
"fiatPaidCents": "78604",
"usdcAmount": "45746116",
"usdcDecimals": 6,
"discountBps": 1000,
"timestamp": 1794040000,
"isFirstPayment": true
}
],
"hasMore": true
}
}{
"success": false,
"response": "<string>"
}{
"success": false,
"error": "<string>"
}{
"success": false,
"response": "<string>"
}{
"success": false,
"response": "<string>"
}Authorizations
API key authentication. Provide your API key as the header value.
Query Parameters
Public key of the token mint (base58)
Query mode: offset for pagination (default), time for a time range
offset, time Maximum number of events to return (1 to 100, default 100). Only used with mode=offset
1 <= x <= 100Number of events to skip (default 0). Only used with mode=offset
x >= 0Start unix timestamp in seconds (inclusive). Required when mode=time
x >= 0End unix timestamp in seconds (inclusive). Required when mode=time. Must be greater than or equal to from
x >= 0Payout method: xmoney (default), cashapp, venmo or all
Payout method to return events for: xmoney (default), cashapp, venmo, or all for every method.
xmoney, cashapp, venmo, all 