API
This page documents the API that powers sugar.money
SDKs
To make integration easier, we provide official SDKs:
Node.js SDK (UPDATE THIS WHEN THE NEW SDK IS LIVE)
Rust SDK: Coming soon! 🦀
Authentication
Most endpoints require authentication via a session cookie (__Secure-next-auth.session-token
). To extract this cookie from your browser session, please refer to our authentication guide (UPDATE THIS WHEN THE REPO WITH EXAMPLES IS LIVE) for detailed instructions.
Rate Limiting
Please note that most API endpoints are rate-limited to ensure fair usage and platform stability.
API Features
Our API includes:
📈 Coins & Trading: Coin creation, candlestick data, holder information, and search capabilities
🎮 Rewards: Automate collecting rewards
💰 Payouts & Rewards: Unified payout system for rewards, referrals, ticket redeeming, and creator rewards.
Base URL
All API endpoints are available at: https://sugar.money/api/v1
Coin address/mint
Time resolution for candlestick data
Offset for pagination
0
Number of candlesticks to return
End timestamp
Whether this is the first data request
GET /api/v1/coin/{address}/candlestick?resolution=1S&limit=1&toTimestamp=1 HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"time": 1,
"open": "text",
"high": "text",
"low": "text",
"close": "text",
"volume": "text"
}
],
"message": "text"
}
Coin address/mint
Comment text
POST /api/v1/coin/{address}/comment HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"comment": "text"
}
{
"data": {
"id": "text",
"mint": "text",
"message": "text",
"userId": "text",
"createdAt": "2025-07-16T08:57:08.895Z"
},
"message": "text"
}
Coin address/mint
Page number
0
Number of comments per page
40
GET /api/v1/coin/{address}/comments HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"id": "text",
"message": "text",
"createdAt": "2025-07-16T08:57:08.895Z",
"user": {
"username": "text",
"image": "text",
"publicKey": "text"
}
}
],
"message": "text"
}
Coin address/mint
GET /api/v1/coin/{address} HTTP/1.1
Host:
Accept: */*
{
"data": {
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
},
"message": "text"
}
Coin address/mint
POST /api/v1/coin/{address}/delete HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
POST /api/v1/coin/{address}/favorite HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
POST /api/v1/coin/{address}/unfavorite HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
GET /api/v1/coin/{address}/holders HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"address": "text",
"amount": "text"
}
],
"message": "text"
}
Coin address/mint
Page number
0
Number of trades per page
20
GET /api/v1/coin/{address}/trades HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"publicKey": "text",
"isBuy": true,
"time": 1,
"price": "text",
"amount": 1,
"totalUsd": 1,
"signature": "text",
"solAmount": 1
}
],
"message": "text"
}
GET /api/v1/coin/featured HTTP/1.1
Host:
Accept: */*
{
"data": {
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
},
"message": "text"
}
Unique file identifier
Current chunk index
Total number of chunks
Base64 encoded chunk data
Operation type (coin-creation-via-api or ipfs-url-for-metadata)
POST /api/v1/coin/metadata HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 222
{
"fileId": "text",
"chunkIndex": 1,
"totalChunks": 1,
"chunk": "text",
"operation": "coin-creation-via-api",
"metadata": {
"name": "text",
"symbol": "text",
"description": "text",
"twitter": "text",
"website": "text",
"migration_in_psol": true
}
}
{
"data": {
"ipfsUrlOriginalImage": "text",
"ipfsUrlCompressedImage": "text",
"ipfsUrlMetadata": "text",
"fileId": "text",
"status": "text"
},
"message": "text"
}
File ID from metadata upload
IPFS URL for original image
IPFS URL for metadata
IPFS URL for compressed image
Whether to migrate in PSOL
POST /api/v1/coin/mint HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"fileId": "text",
"ipfsUrlOriginalImage": "text",
"ipfsUrlMetadata": "text",
"ipfsUrlCompressedImage": "text",
"migrationInPsol": true
}
{
"data": {
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
},
"message": "text"
}
Page number
0
Filter type
Minimum bonding curve value
Maximum bonding curve value
Minimum market cap
Maximum market cap
Minimum coin age
Maximum coin age
Comma-separated strings to include
Comma-separated strings to exclude
Minimum number of coin holders
Maximum number of coin holders
Hide NSFW content
SOL price in USD
GET /api/v1/coins HTTP/1.1
Host:
Accept: */*
{
"data": {
"coins": [
{
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
}
],
"totalCount": 1,
"page": 1
},
"message": "text"
}
Search term
Page number
0
GET /api/v1/coins/search HTTP/1.1
Host:
Accept: */*
{
"data": {
"data": [
{
"mint": "text",
"name": "text",
"symbol": "text",
"image_uri": "text",
"coinMarketCap": 1,
"solPrice": "text"
}
],
"nextPage": 1
},
"message": "text"
}
GET /api/v1/fees HTTP/1.1
Host:
Accept: */*
{
"data": {
"jito": {
"landedTips25thPercentile": 1,
"landedTips50thPercentile": 1,
"landedTips75thPercentile": 1,
"landedTips95thPercentile": 1,
"landedTips99thPercentile": 1,
"emaLandedTips50thPercentile": 1
}
},
"message": "text"
}
Number of tickets to use
POST /api/v1/game/create HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"tickets": 1
}
{
"data": {},
"message": "text"
}
GET /api/v1/game/current HTTP/1.1
Host:
Accept: */*
{
"data": {
"id": "text",
"revealedPositions": [
1
],
"tickets": 1
},
"message": "text"
}
Page number
0
Page size
10
GET /api/v1/game/history HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"id": "text",
"tickets": 1,
"solAmount": "text",
"createdAt": "text",
"multiplier": 1,
"signature": "text",
"status": "text",
"hash": "text",
"seed": "text",
"state": {},
"updatedAt": "text",
"awardedPoints": 1
}
],
"message": "text"
}
Grid index to reveal
Game ID
POST /api/v1/game/update HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"index": 1,
"gameId": "text"
}
{
"data": {},
"message": "text"
}
GET /api/v1/game/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"timeRemaining": 1,
"inProgress": true
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
POST /api/v1/game/payout/submit HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"signed_tx": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": "text"
}
{
"data": {},
"message": "text"
}
Referral code to check
GET /api/v1/referrals/code-exists?code=text HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Referral code to link
POST /api/v1/referrals/link HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"data": true,
"message": "text"
}
GET /api/v1/referrals/me HTTP/1.1
Host:
Accept: */*
{
"data": {
"referredUsers": [
{
"referralGeneratedAmount": 1,
"referralTradingVolume": 1,
"createdAt": "text",
"publicKey": "text"
}
]
},
"message": "text"
}
Referral code to create
POST /api/v1/referrals/me HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"data": {},
"message": "text"
}
GET /api/v1/referrals/me/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"timeRemaining": 1,
"inProgress": true
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
POST /api/v1/referrals/me/payout/submit HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"signed_tx": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": "text"
}
{
"data": {},
"message": "text"
}
GET /api/v1/tickets/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"timeRemaining": 1,
"inProgress": true
},
"message": "text"
}
Number of tickets to cash out
POST /api/v1/tickets/payout/request HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"tickets": 1
}
{
"data": {},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
POST /api/v1/tickets/payout/submit HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"signed_tx": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": "text"
}
{
"data": {},
"message": "text"
}
Serialized transaction data
Coin mint address
Recent blockhash for the transaction
Last valid block height for the transaction
POST /api/v1/transaction/sign HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"serialisedTx": "text",
"mint": "text",
"blockhash": "text",
"lastValidBlockHeight": 1
}
{
"data": {},
"message": "text"
}
Coin address/mint
GET /api/v1/user/coin/{address}/trade-metrics HTTP/1.1
Host:
Accept: */*
{
"data": {
"totalBoughtCoin": "text",
"totalSoldCoin": "text",
"costBasisSol": "text",
"costBasisUsd": "text",
"realizedPnlSol": "text",
"realizedPnlUsd": "text",
"volumeSol": "text",
"volumeUsd": "text"
},
"message": "text"
}
GET /api/v1/user/coins HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
}
],
"message": "text"
}
GET /api/v1/user/creator-rewards/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"timeRemaining": 1,
"inProgress": true
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
POST /api/v1/user/creator-rewards/payout/submit HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"signed_tx": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": "text"
}
{
"data": {},
"message": "text"
}
GET /api/v1/user/favorites HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
}
],
"message": "text"
}
SOL price in USD
GET /api/v1/user/holdings HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"amount": "text",
"coin": {
"address": "text",
"coinSymbol": "text",
"coinName": "text",
"coinSrc": "text",
"coinCreationTime": 1,
"coinMarketCap": 1,
"username": "text",
"holders": 1,
"comments": 1,
"xUrl": "text",
"websiteUrl": "text",
"featured": true,
"coinAmount": "text",
"solPrice": 1,
"solAmount": "text",
"bondingCurve": "text",
"creator": "text",
"coinDescription": "text",
"bondingCurveComplete": true,
"raydiumPoolAddress": "text"
}
}
],
"message": "text"
}
GET /api/v1/user/points/history HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"timestamp": 1,
"points": 1,
"tradingVolume": 1
}
],
"message": "text"
}
GET /api/v1/user/preferences HTTP/1.1
Host:
Accept: */*
{
"data": {
"bribeAmount": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"favoriteCoins": [
"text"
],
"autoSortingEnabled": true,
"username": "text"
},
"message": "text"
}
PATCH /api/v1/user/preferences HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 220
{
"bribeAmount": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"favoriteCoins": [
"text"
],
"autoSortingEnabled": true,
"username": "text"
}
{
"data": {
"bribeAmount": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"favoriteCoins": [
"text"
],
"autoSortingEnabled": true,
"username": "text"
},
"message": "text"
}
Last updated