Decode Payout Transaction
curl --request GET \
--url https://api.polynode.dev/v3/credits/txs/{hash} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/credits/txs/{hash}"
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://api.polynode.dev/v3/credits/txs/{hash}', 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://api.polynode.dev/v3/credits/txs/{hash}",
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://api.polynode.dev/v3/credits/txs/{hash}"
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://api.polynode.dev/v3/credits/txs/{hash}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/credits/txs/{hash}")
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{
"tx_hash": "0xb3b589e87145a7a61324bca2a241c891fd488cf0615e5c2d7a3121b28698d7a6",
"block_number": 90017147,
"timestamp": 1783730716,
"type": "maker_rebate",
"recipients": 400,
"total_amount": "187330.184700",
"events": [
{
"amount": "3714.480000",
"log_index": 2043,
"recipient": "0x204f72f35326db932158cba6adff0b9a1da95e14",
"timestamp": 1783730716,
"token": "pusd",
"type": "maker_rebate",
"tx_hash": "0xb3b589e87145a7a61324bca2a241c891fd488cf0615e5c2d7a3121b28698d7a6",
"block_number": 90017147
}
]
}Credits API Reference
Decode Payout Transaction
Decode one payout transaction into typed credit rows: every recipient, every amount.
GET
/
v3
/
credits
/
txs
/
{hash}
Decode Payout Transaction
curl --request GET \
--url https://api.polynode.dev/v3/credits/txs/{hash} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.polynode.dev/v3/credits/txs/{hash}"
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://api.polynode.dev/v3/credits/txs/{hash}', 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://api.polynode.dev/v3/credits/txs/{hash}",
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://api.polynode.dev/v3/credits/txs/{hash}"
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://api.polynode.dev/v3/credits/txs/{hash}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.polynode.dev/v3/credits/txs/{hash}")
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{
"tx_hash": "0xb3b589e87145a7a61324bca2a241c891fd488cf0615e5c2d7a3121b28698d7a6",
"block_number": 90017147,
"timestamp": 1783730716,
"type": "maker_rebate",
"recipients": 400,
"total_amount": "187330.184700",
"events": [
{
"amount": "3714.480000",
"log_index": 2043,
"recipient": "0x204f72f35326db932158cba6adff0b9a1da95e14",
"timestamp": 1783730716,
"token": "pusd",
"type": "maker_rebate",
"tx_hash": "0xb3b589e87145a7a61324bca2a241c891fd488cf0615e5c2d7a3121b28698d7a6",
"block_number": 90017147
}
]
}Turn one payout transaction hash into its full typed breakdown: every recipient and amount in the batch.
Credit types
Every credits endpoint accepts these values intype/types:
| Value | Program |
|---|---|
reward | Liquidity rewards |
yield | Yield on balances |
maker_rebate | Maker rebates |
taker_rebate | Taker rebates |
referral_reward | Referral rewards |
types accepts a comma-separated set (types=maker_rebate,taker_rebate) or all.
Example
curl "https://api.polynode.dev/v3/credits/txs/0xb3b589e87145a7a61324bca2a241c891fd488cf0615e5c2d7a3121b28698d7a6" \
-H "x-api-key: $POLYNODE_API_KEY"
⌘I

