API
This page documents the API that powers sugar.money
SDKs
To make integration easier, we provide official SDKs:
Rust SDK - coming soon 🦀
Please open an issue here if you run into issues using any of our SDKs.
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 for detailed instructions. Alternatively, use the SDKs listed above.
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
Candlestick data retrieved successfully
Bad request
Internal server error
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
Comment created successfully
Unauthorized
Internal server error
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-08-24T14:07:26.001Z"
},
"message": "text"
}
Coin address/mint
Page number
0
Number of comments per page
40
Comments retrieved successfully
Internal server error
GET /api/v1/coin/{address}/comments HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"id": "text",
"message": "text",
"createdAt": "2025-08-24T14:07:26.001Z",
"user": {
"username": "text",
"image": "text",
"publicKey": "text"
}
}
],
"message": "text"
}
Coin address/mint
Coin details retrieved successfully
Bad request
Coin not found
Internal server error
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",
"migratedToRaydiumAt": "text"
},
"message": "text"
}
Coin address/mint
Coin deletion result
Unauthorized
Internal server error
POST /api/v1/coin/{address}/delete HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
Coin marked as favorite
Bad request
Unauthorized
Internal server error
POST /api/v1/coin/{address}/favorite HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
Coin removed from favorites
Bad request
Unauthorized
Internal server error
POST /api/v1/coin/{address}/unfavorite HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Coin address/mint
Coin holders retrieved successfully
Internal server error
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
Trading history retrieved successfully
Internal server error
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"
}
Featured coin retrieved successfully
Internal server error
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",
"migratedToRaydiumAt": "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)
Metadata uploaded successfully
Bad request
Unauthorized
Internal server error
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
Coin created successfully
Bad request
Unauthorized
Internal server error
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",
"migratedToRaydiumAt": "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
Coins retrieved successfully
Internal server error
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",
"migratedToRaydiumAt": "text"
}
],
"totalCount": 1,
"page": 1
},
"message": "text"
}
Search term
Page number
0
Search results retrieved successfully
Internal server error
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"
}
Fees information retrieved successfully
Unauthorized
Internal server error
GET /api/v1/fees HTTP/1.1
Host:
Accept: */*
{
"data": {
"jito": {
"landedTips25thPercentile": 1,
"landedTips50thPercentile": 1,
"landedTips75thPercentile": 1,
"landedTips95thPercentile": 1,
"landedTips99thPercentile": 1,
"emaLandedTips50thPercentile": 1
},
"regular": {
"extreme": 1,
"high": 1,
"low": 1,
"medium": 1
},
"coinCreationFee": 1
},
"message": "text"
}
Number of tickets to use
Game created successfully
Bad request
Unauthorized
Internal server error
POST /api/v1/game/create HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"tickets": 1
}
{
"data": {
"gameId": "text",
"updatedTickets": 1,
"gameHashed": "text"
},
"message": "text"
}
Current game retrieved successfully
Unauthorized
Internal server error
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
Game history retrieved successfully
Unauthorized
Internal server error
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": [
1
],
"updatedAt": "text",
"awardedPoints": 1
}
],
"message": "text"
}
Grid index to reveal
Game ID
Game updated successfully
Bad request
Unauthorized
Internal server error
POST /api/v1/game/update HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"index": 1,
"gameId": "text"
}
{
"data": {
"newPositions": [
1
],
"multiplier": 1,
"isMatch": true,
"payoutAmount": "text",
"state": [
1
]
},
"message": "text"
}
Payout progress retrieved successfully
Unauthorized
Internal server error
GET /api/v1/game/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"expiresAt": 1,
"inProgress": true
},
"message": "text"
}
Payout requested successfully
Unauthorized
Internal server error
POST /api/v1/game/payout/request HTTP/1.1
Host:
Accept: */*
{
"data": {
"serialisedTransaction": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": 1
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
Payout submitted successfully
Unauthorized
Internal server error
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": {
"signature": "text",
"status": "processing"
},
"message": "text"
}
Recent games retrieved successfully
Internal server error
GET /api/v1/games/recent HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"username": "text",
"solReward": "text",
"numberOfTickets": 1,
"timestamp": 1,
"gameId": "text"
}
],
"message": "text"
}
Ranks retrieved successfully
Unauthorized
Internal server error
GET /api/v1/ranks HTTP/1.1
Host:
Accept: */*
{
"data": {
"ranks": [
{
"rank": "text",
"minPoints": "text"
}
],
"rate": 1
},
"message": "text"
}
Referral code to check
Code existence checked successfully
Bad request
Unauthorized
Internal server error
GET /api/v1/referrals/code-exists?code=text HTTP/1.1
Host:
Accept: */*
{
"data": true,
"message": "text"
}
Referral code to link
Referral code linked successfully
Bad request
Unauthorized
Internal server error
POST /api/v1/referrals/link HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"data": true,
"message": "text"
}
User referral data retrieved successfully
Unauthorized
Internal server error
GET /api/v1/referrals/me HTTP/1.1
Host:
Accept: */*
{
"data": {
"referralPendingPayout": 1,
"tradingFees": 1,
"ownReferralCode": "text",
"ownReferralCodeEarnPercentage": 1,
"referredUsers": [
{
"referralGeneratedAmount": 1,
"referralTradingVolume": 1,
"createdAt": "text",
"publicKey": "text"
}
],
"referredByPublicKey": "text",
"totalReferredUsers": 1
},
"message": "text"
}
Referral code to create
Referral code created successfully
Bad request
Unauthorized
Internal server error
POST /api/v1/referrals/me HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"data": {
"code": "text",
"earnPercentage": 1
},
"message": "text"
}
Payout progress retrieved successfully
Unauthorized
Internal server error
GET /api/v1/referrals/me/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"expiresAt": 1,
"inProgress": true
},
"message": "text"
}
Payout requested successfully
Unauthorized
Internal server error
POST /api/v1/referrals/me/payout/request HTTP/1.1
Host:
Accept: */*
{
"data": {
"serialisedTransaction": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": 1
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
Payout submitted successfully
Unauthorized
Internal server error
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": {
"signature": "text",
"status": "processing"
},
"message": "text"
}
Payout progress retrieved successfully
Unauthorized
Internal server error
GET /api/v1/tickets/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"expiresAt": 1,
"inProgress": true
},
"message": "text"
}
Number of tickets to cash out
Payout requested successfully
Bad request
Unauthorized
Internal server error
POST /api/v1/tickets/payout/request HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"tickets": 1
}
{
"data": {
"serialisedTransaction": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": 1
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
Payout submitted successfully
Unauthorized
Internal server error
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": {
"signature": "text",
"status": "processing"
},
"message": "text"
}
Serialized transaction data
Coin mint address
Recent blockhash for the transaction
Last valid block height for the transaction
Transaction signed successfully
Unauthorized
Internal server error
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": {
"signature": "text",
"status": "processing"
},
"message": "text"
}
Coin address/mint
Trade metrics retrieved successfully
Unauthorized
Internal server error
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"
}
User created coins retrieved successfully
Unauthorized
Internal server error
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",
"migratedToRaydiumAt": "text"
}
],
"message": "text"
}
Payout progress retrieved successfully
Unauthorized
Internal server error
GET /api/v1/user/creator-rewards/payout/in-progress HTTP/1.1
Host:
Accept: */*
{
"data": {
"expiresAt": 1,
"inProgress": true
},
"message": "text"
}
Payout requested successfully
Unauthorized
Internal server error
POST /api/v1/user/creator-rewards/payout/request HTTP/1.1
Host:
Accept: */*
{
"data": {
"serialisedTransaction": "text",
"blockhash": "text",
"lastValidBlockHeight": 1,
"nonce": 1
},
"message": "text"
}
Signed transaction
Recent blockhash
Last valid block height
Transaction nonce
Payout submitted successfully
Unauthorized
Internal server error
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": {
"signature": "text",
"status": "processing"
},
"message": "text"
}
User favorites retrieved successfully
Unauthorized
Internal server error
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",
"migratedToRaydiumAt": "text"
}
],
"message": "text"
}
SOL price in USD
User holdings retrieved successfully
Unauthorized
Internal server error
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",
"migratedToRaydiumAt": "text"
}
}
],
"message": "text"
}
Points history retrieved successfully
Unauthorized
Internal server error
GET /api/v1/user/points/history HTTP/1.1
Host:
Accept: */*
{
"data": [
{
"timestamp": 1,
"points": 1,
"tradingVolume": 1
}
],
"message": "text"
}
User preferences retrieved successfully
Internal server error
GET /api/v1/user/preferences HTTP/1.1
Host:
Accept: */*
{
"data": {
"bribeAmount": 1,
"priorityFeeAmount": 1,
"maxFee": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"autoSortingEnabled": true,
"username": "text",
"usernameUpdatedAt": "text",
"points": 1,
"tickets": 1,
"creatorPayout": 1,
"pointsPumpFun": 1,
"antiMevProtection": true,
"tradingSettingsAuto": true,
"sidebarOpen": true,
"revealedBonusPoints": true
},
"message": "text"
}
User preferences updated successfully
Bad request
Unauthorized
Internal server error
PATCH /api/v1/user/preferences HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 412
{
"bribeAmount": 1,
"priorityFeeAmount": 1,
"maxFee": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"autoSortingEnabled": true,
"username": "text",
"usernameUpdatedAt": "text",
"points": 1,
"tickets": 1,
"creatorPayout": 1,
"pointsPumpFun": 1,
"antiMevProtection": true,
"tradingSettingsAuto": true,
"sidebarOpen": true,
"revealedBonusPoints": true
}
{
"data": {
"bribeAmount": 1,
"priorityFeeAmount": 1,
"maxFee": 1,
"quickBuy": true,
"quickBuy1": 1,
"quickBuy2": 1,
"quickBuy3": 1,
"sellPrefersCoin": true,
"hideNsfw": true,
"maxSlippage": 1,
"selectedQuickBuy": 1,
"autoSortingEnabled": true,
"username": "text",
"usernameUpdatedAt": "text",
"points": 1,
"tickets": 1,
"creatorPayout": 1,
"pointsPumpFun": 1,
"antiMevProtection": true,
"tradingSettingsAuto": true,
"sidebarOpen": true,
"revealedBonusPoints": true
},
"message": "text"
}
Last updated