curl --request GET \
--url https://api.stateset.com/v1/stablecoin/transactions \
--header 'Authorization: Bearer <token>'{
"transactions": [
{
"id": "txn_abc123def456",
"type": "transfer",
"transaction_hash": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0",
"from": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"to": "stateset1abcdefghijklmnopqrstuvwxyz123456789012",
"amount": {
"denom": "ssusd",
"amount": "500000000",
"display_amount": "500.00 ssUSD",
"usd_value": "500.00"
},
"fees": {
"network_fee": "0.01",
"processing_fee": "0.00"
},
"status": "confirmed",
"block_height": 1234567,
"memo": "Payment for invoice #INV-2024-001",
"metadata": {
"invoice_id": "inv_123456",
"order_id": "ord_789012"
},
"created_at": "2024-01-15T09:30:00Z",
"confirmed_at": "2024-01-15T09:30:05Z"
},
{
"id": "txn_xyz789uvw012",
"type": "issue",
"transaction_hash": "B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1",
"from": null,
"to": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"amount": {
"denom": "ssusd",
"amount": "10000000000",
"display_amount": "10,000.00 ssUSD",
"usd_value": "10000.00"
},
"fees": {
"network_fee": "0.50",
"processing_fee": "10.00"
},
"status": "confirmed",
"block_height": 1234500,
"memo": "Merchant funding",
"metadata": {
"reference_id": "ISS-2024-001234",
"source_type": "bank_wire"
},
"created_at": "2024-01-14T14:20:00Z",
"confirmed_at": "2024-01-14T14:20:10Z"
}
],
"pagination": {
"total": 156,
"limit": 20,
"offset": 0,
"has_more": true
}
}
Retrieve stablecoin transaction history with filtering and pagination
curl --request GET \
--url https://api.stateset.com/v1/stablecoin/transactions \
--header 'Authorization: Bearer <token>'{
"transactions": [
{
"id": "txn_abc123def456",
"type": "transfer",
"transaction_hash": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0",
"from": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"to": "stateset1abcdefghijklmnopqrstuvwxyz123456789012",
"amount": {
"denom": "ssusd",
"amount": "500000000",
"display_amount": "500.00 ssUSD",
"usd_value": "500.00"
},
"fees": {
"network_fee": "0.01",
"processing_fee": "0.00"
},
"status": "confirmed",
"block_height": 1234567,
"memo": "Payment for invoice #INV-2024-001",
"metadata": {
"invoice_id": "inv_123456",
"order_id": "ord_789012"
},
"created_at": "2024-01-15T09:30:00Z",
"confirmed_at": "2024-01-15T09:30:05Z"
},
{
"id": "txn_xyz789uvw012",
"type": "issue",
"transaction_hash": "B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1",
"from": null,
"to": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"amount": {
"denom": "ssusd",
"amount": "10000000000",
"display_amount": "10,000.00 ssUSD",
"usd_value": "10000.00"
},
"fees": {
"network_fee": "0.50",
"processing_fee": "10.00"
},
"status": "confirmed",
"block_height": 1234500,
"memo": "Merchant funding",
"metadata": {
"reference_id": "ISS-2024-001234",
"source_type": "bank_wire"
},
"created_at": "2024-01-14T14:20:00Z",
"confirmed_at": "2024-01-14T14:20:10Z"
}
],
"pagination": {
"total": 156,
"limit": 20,
"offset": 0,
"has_more": true
}
}
stablecoin:read permissions.
Authorization: Bearer YOUR_API_KEY
Show Transaction Object
{
"transactions": [
{
"id": "txn_abc123def456",
"type": "transfer",
"transaction_hash": "A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0",
"from": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"to": "stateset1abcdefghijklmnopqrstuvwxyz123456789012",
"amount": {
"denom": "ssusd",
"amount": "500000000",
"display_amount": "500.00 ssUSD",
"usd_value": "500.00"
},
"fees": {
"network_fee": "0.01",
"processing_fee": "0.00"
},
"status": "confirmed",
"block_height": 1234567,
"memo": "Payment for invoice #INV-2024-001",
"metadata": {
"invoice_id": "inv_123456",
"order_id": "ord_789012"
},
"created_at": "2024-01-15T09:30:00Z",
"confirmed_at": "2024-01-15T09:30:05Z"
},
{
"id": "txn_xyz789uvw012",
"type": "issue",
"transaction_hash": "B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6Q7R8S9T0U1",
"from": null,
"to": "stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu",
"amount": {
"denom": "ssusd",
"amount": "10000000000",
"display_amount": "10,000.00 ssUSD",
"usd_value": "10000.00"
},
"fees": {
"network_fee": "0.50",
"processing_fee": "10.00"
},
"status": "confirmed",
"block_height": 1234500,
"memo": "Merchant funding",
"metadata": {
"reference_id": "ISS-2024-001234",
"source_type": "bank_wire"
},
"created_at": "2024-01-14T14:20:00Z",
"confirmed_at": "2024-01-14T14:20:10Z"
}
],
"pagination": {
"total": 156,
"limit": 20,
"offset": 0,
"has_more": true
}
}
| Code | Description |
|---|---|
400 | Invalid query parameters |
401 | Unauthorized - Invalid API key |
429 | Rate limit exceeded |
500 | Internal server error |
const axios = require('axios');
async function getTransactionHistory(params) {
try {
const response = await axios.get(
'https://api.stateset.com/v1/stablecoin/transactions',
{
params: {
address: 'stateset1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu',
type: 'transfer',
denom: 'ssusd',
start_date: '2024-01-01T00:00:00Z',
limit: 50,
order: 'desc'
},
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
console.log(`Found ${response.data.pagination.total} transactions`);
response.data.transactions.forEach(tx => {
console.log(`${tx.type}: ${tx.amount.display_amount} - ${tx.status}`);
});
return response.data;
} catch (error) {
console.error('Failed to get transactions:', error.response.data);
}
}