# API

### SDKs

To make integration easier, we provide official SDKs:

* [**Node.js SDK**](https://www.npmjs.com/package/sugar-money)
* [**Rust SDK**](https://crates.io/crates/sugar-money)

Please open an issue [here](https://github.com/Sugar-Money/sdk-issues) 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](https://github.com/Sugar-Money/examples) 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`

## GET /coin/{address}/candlestick

> Get coin candlestick data

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/{address}/candlestick":{"get":{"tags":["Coins"],"summary":"Get coin candlestick data","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"},{"name":"resolution","in":"query","required":true,"schema":{"type":"string","enum":["1S","5S","1","3","60","360","1D","5D"]},"description":"Time resolution for candlestick data"},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Offset for pagination"},{"name":"limit","in":"query","required":true,"schema":{"type":"integer","minimum":1},"description":"Number of candlesticks to return"},{"name":"toTimestamp","in":"query","required":true,"schema":{"type":"integer","minimum":1},"description":"End timestamp"},{"name":"isFirstDataRequest","in":"query","schema":{"type":"boolean"},"description":"Whether this is the first data request"}],"responses":{"200":{"description":"Candlestick data retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CandlestickData"}},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CandlestickData":{"type":"object","properties":{"time":{"type":"number"},"open":{"type":"string"},"high":{"type":"string"},"low":{"type":"string"},"close":{"type":"string"},"volume":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## POST /coin/{address}/comment

> Create a coin comment

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CoinCommentCreateResponse":{"type":"object","properties":{"id":{"type":"string","description":"Comment ID"},"mint":{"type":"string","description":"Coin mint address"},"message":{"type":"string","description":"Comment message"},"userId":{"type":"string","description":"User ID who created the comment"},"createdAt":{"type":"string","format":"date-time","description":"When the comment was created"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/{address}/comment":{"post":{"tags":["Coins"],"summary":"Create a coin comment","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["comment"],"properties":{"comment":{"type":"string","description":"Comment text"}}}}}},"responses":{"200":{"description":"Comment created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CoinCommentCreateResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /coin/{address}/comments

> Get coin comments

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/{address}/comments":{"get":{"tags":["Coins"],"summary":"Get coin comments","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"},{"name":"page","in":"query","schema":{"type":"integer","default":0},"description":"Page number"},{"name":"limit","in":"query","schema":{"type":"integer","default":40},"description":"Number of comments per page"}],"responses":{"200":{"description":"Comments retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoinComment"}},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CoinComment":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"user":{"type":"object","properties":{"username":{"type":"string"},"image":{"type":"string"},"publicKey":{"type":"string"}}}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /coin/{address}

> Get coin details

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/{address}":{"get":{"tags":["Coins"],"summary":"Get coin details","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Coin details retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Coin"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Coin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## POST /coin/{address}/delete

> Delete a coin

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/{address}/delete":{"post":{"tags":["Coins"],"summary":"Delete a coin","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Coin deletion result","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /coin/{address}/favorite

> Mark coin as favorite

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/{address}/favorite":{"post":{"tags":["Coins"],"summary":"Mark coin as favorite","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Coin marked as favorite","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /coin/{address}/unfavorite

> Remove coin from favorites

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/{address}/unfavorite":{"post":{"tags":["Coins"],"summary":"Remove coin from favorites","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Coin removed from favorites","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /coin/{address}/holders

> Get coin holders

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/{address}/holders":{"get":{"tags":["Coins"],"summary":"Get coin holders","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Coin holders retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoinHolder"}},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CoinHolder":{"type":"object","properties":{"address":{"type":"string"},"amount":{"type":"string"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /coin/{address}/trades

> Get coin trading history

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/{address}/trades":{"get":{"tags":["Coins"],"summary":"Get coin trading history","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"},{"name":"page","in":"query","schema":{"type":"integer","default":0},"description":"Page number"},{"name":"limit","in":"query","schema":{"type":"integer","default":20},"description":"Number of trades per page"}],"responses":{"200":{"description":"Trading history retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CoinTrade"}},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"CoinTrade":{"type":"object","properties":{"publicKey":{"type":"string"},"isBuy":{"type":"boolean"},"time":{"type":"number"},"price":{"type":"string"},"amount":{"type":"number"},"totalUsd":{"type":"number"},"signature":{"type":"string"},"solAmount":{"type":"number"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /coin/featured

> Get featured coin

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coin/featured":{"get":{"tags":["Coins"],"summary":"Get featured coin","responses":{"200":{"description":"Featured coin retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/Coin"},{"type":"null"}]},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## POST /coin/metadata

> Upload coin metadata

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/metadata":{"post":{"tags":["Coins"],"summary":"Upload coin metadata","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fileId","chunkIndex","totalChunks","chunk","operation"],"properties":{"fileId":{"type":"string","description":"Unique file identifier"},"chunkIndex":{"type":"integer","minimum":0,"description":"Current chunk index"},"totalChunks":{"type":"integer","minimum":1,"description":"Total number of chunks"},"chunk":{"type":"string","description":"Base64 encoded chunk data"},"operation":{"type":"string","enum":["coin-creation-via-api","ipfs-url-for-metadata"],"description":"Operation type (coin-creation-via-api or ipfs-url-for-metadata)"},"metadata":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"description":{"type":"string"},"twitter":{"type":"string"},"website":{"type":"string"},"migration_in_psol":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Metadata uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"ipfsUrlOriginalImage":{"type":"string"},"ipfsUrlMetadata":{"type":"string"},"fileId":{"type":"string"},"status":{"type":"string"}},"description":"Object response for coin-creation-via-api operation"},{"type":"string","description":"IPFS URL string response for ipfs-url-for-metadata operation"}]},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /coin/mint

> Get coin minting information

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CoinMintResponse":{"type":"string","description":"Coin mint information"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/mint":{"get":{"tags":["Coins"],"summary":"Get coin minting information","responses":{"200":{"description":"Coin minting information retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CoinMintResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /coin/mint

> Create a new coin

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/coin/mint":{"post":{"tags":["Coins"],"summary":"Create a new coin","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fileId"],"properties":{"fileId":{"type":"string","description":"File ID from metadata upload"},"ipfsUrlOriginalImage":{"type":"string","description":"IPFS URL for original image"},"ipfsUrlMetadata":{"type":"string","description":"IPFS URL for metadata"},"migrationInPsol":{"type":"boolean","description":"Whether to migrate in PSOL"}}}}}},"responses":{"200":{"description":"Coin created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Coin"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /coins

> Get paginated list of coins

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coins":{"get":{"tags":["Coins"],"summary":"Get paginated list of coins","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":0},"description":"Page number"},{"name":"filter","in":"query","schema":{"type":"string"},"description":"Filter type"},{"name":"bondingCurveFrom","in":"query","schema":{"type":"number"},"description":"Minimum bonding curve value"},{"name":"bondingCurveTo","in":"query","schema":{"type":"number"},"description":"Maximum bonding curve value"},{"name":"marketCapFrom","in":"query","schema":{"type":"number"},"description":"Minimum market cap"},{"name":"marketCapTo","in":"query","schema":{"type":"number"},"description":"Maximum market cap"},{"name":"coinAgeFrom","in":"query","schema":{"type":"number"},"description":"Minimum coin age"},{"name":"coinAgeTo","in":"query","schema":{"type":"number"},"description":"Maximum coin age"},{"name":"toShow","in":"query","schema":{"type":"string"},"description":"Comma-separated strings to include"},{"name":"doNotShow","in":"query","schema":{"type":"string"},"description":"Comma-separated strings to exclude"},{"name":"coinHoldersFrom","in":"query","schema":{"type":"number"},"description":"Minimum number of coin holders"},{"name":"coinHoldersTo","in":"query","schema":{"type":"number"},"description":"Maximum number of coin holders"},{"name":"hideNsfw","in":"query","schema":{"type":"boolean"},"description":"Hide NSFW content"},{"name":"solPriceUsd","in":"query","schema":{"type":"number"},"description":"SOL price in USD"}],"responses":{"200":{"description":"Coins retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"coins":{"type":"array","items":{"$ref":"#/components/schemas/Coin"}},"totalCount":{"type":"number"},"page":{"type":"number"}}},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /coins/search

> Search coins

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/coins/search":{"get":{"tags":["Coins"],"summary":"Search coins","parameters":[{"name":"searchTerm","in":"query","schema":{"type":"string"},"description":"Search term"},{"name":"page","in":"query","schema":{"type":"integer","default":0},"description":"Page number"}],"responses":{"200":{"description":"Search results retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"mint":{"type":"string"},"name":{"type":"string"},"symbol":{"type":"string"},"image_uri":{"type":"string"},"coinMarketCap":{"type":"number"},"solPrice":{"type":"string"}}}},"nextPage":{"type":"integer","nullable":true}}},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /fees

> Get fees information

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/fees":{"get":{"tags":["General"],"summary":"Get fees information","responses":{"200":{"description":"Fees information retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"jito":{"type":"object","properties":{"landedTips25thPercentile":{"type":"number"},"landedTips50thPercentile":{"type":"number"},"landedTips75thPercentile":{"type":"number"},"landedTips95thPercentile":{"type":"number"},"landedTips99thPercentile":{"type":"number"},"emaLandedTips50thPercentile":{"type":"number"}}},"regular":{"type":"object","properties":{"extreme":{"type":"number"},"high":{"type":"number"},"low":{"type":"number"},"medium":{"type":"number"}}},"coinCreationFee":{"type":"number"}}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /price/sol

> Get SOL price

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/price/sol":{"get":{"tags":["Price"],"summary":"Get SOL price","responses":{"200":{"description":"SOL price retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"number","description":"Current SOL price"},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## POST /game/create

> Create a new game

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"GameCreateResponse":{"type":"object","properties":{"gameId":{"type":"string","description":"Unique identifier for the created game"},"updatedTickets":{"type":"number","description":"User's remaining tickets after game creation"},"gameHashed":{"type":"string","description":"Hashed game data for verification"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/create":{"post":{"tags":["Game"],"summary":"Create a new game","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tickets"],"properties":{"tickets":{"type":"integer","minimum":1,"description":"Number of tickets to use"}}}}}},"responses":{"200":{"description":"Game created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GameCreateResponse"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /game/current

> Get current game

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/current":{"get":{"tags":["Game"],"summary":"Get current game","responses":{"200":{"description":"Current game retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"revealedPositions":{"type":"array","items":{"type":"number"}},"tickets":{"type":"number"}}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /game/history

> Get game history

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"GameHistory":{"type":"object","properties":{"id":{"type":"string"},"tickets":{"type":"number"},"solAmount":{"type":"string"},"createdAt":{"type":"string"},"multiplier":{"type":"number"},"signature":{"type":"string"},"status":{"type":"string"},"hash":{"type":"string"},"seed":{"type":"string"},"state":{"type":"array","items":{"type":"number"},"nullable":true,"description":"Game state as array of numbers"},"updatedAt":{"type":"string"},"awardedPoints":{"type":"number"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/history":{"get":{"tags":["Game"],"summary":"Get game history","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":0},"description":"Page number"},{"name":"pageSize","in":"query","schema":{"type":"integer","default":10},"description":"Page size"}],"responses":{"200":{"description":"Game history retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GameHistory"}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /game/payout/in-progress

> Check game payout progress

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutProgress":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Unix timestamp when the payout process expires"},"inProgress":{"type":"boolean","description":"Whether a payout is currently in progress"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/payout/in-progress":{"get":{"tags":["Game"],"summary":"Check game payout progress","responses":{"200":{"description":"Payout progress retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutProgress"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /game/update

> Update game state

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"GameUpdateResponse":{"type":"object","properties":{"newPositions":{"type":"array","items":{"type":"number"},"description":"New revealed positions in the game grid"},"multiplier":{"type":"number","description":"Current multiplier for the game"},"isMatch":{"type":"boolean","description":"Whether the current move resulted in a match"},"payoutAmount":{"type":"string","nullable":true,"description":"Payout amount if game is won"},"state":{"type":"array","items":{"type":"number"},"nullable":true,"description":"Current game state"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/update":{"post":{"tags":["Game"],"summary":"Update game state","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["index","gameId"],"properties":{"index":{"type":"integer","minimum":0,"maximum":19,"description":"Grid index to reveal"},"gameId":{"type":"string","description":"Game ID"}}}}}},"responses":{"200":{"description":"Game updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/GameUpdateResponse"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /game/payout/request

> Request game payout

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutRequestResponse":{"type":"object","properties":{"serialisedTransaction":{"type":"string","description":"Serialized transaction ready for signing"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"},"nonce":{"type":"number","description":"Transaction nonce"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/payout/request":{"post":{"tags":["Game"],"summary":"Request game payout","responses":{"200":{"description":"Payout requested successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutRequestResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /game/payout/submit

> Submit game payout transaction

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/game/payout/submit":{"post":{"tags":["Game"],"summary":"Submit game payout transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signed_tx","blockhash","lastValidBlockHeight","nonce"],"properties":{"signed_tx":{"type":"string","description":"Signed transaction"},"blockhash":{"type":"string","description":"Recent blockhash"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height"},"nonce":{"type":"string","description":"Transaction nonce"}}}}}},"responses":{"200":{"description":"Payout submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /games/recent

> Get recent games

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/games/recent":{"get":{"tags":["Game"],"summary":"Get recent games","responses":{"200":{"description":"Recent games retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecentGamesResponse"},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"RecentGamesResponse":{"type":"array","items":{"$ref":"#/components/schemas/RecentGameItem"},"description":"Array of recent game results"},"RecentGameItem":{"type":"object","properties":{"username":{"type":"string","description":"Username of the player"},"solReward":{"type":"string","description":"SOL reward amount"},"numberOfTickets":{"type":"number","description":"Number of tickets used"},"timestamp":{"type":"number","description":"Game timestamp"},"gameId":{"type":"string","description":"Game identifier"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## GET /points/tickets-rate

> Get points to tickets exchange rate

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PointsTicketsRateResponse":{"type":"number","description":"Exchange rate value for converting points to tickets"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/points/tickets-rate":{"get":{"tags":["Points"],"summary":"Get points to tickets exchange rate","responses":{"200":{"description":"Exchange rate retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PointsTicketsRateResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /ranks

> Get user ranks

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"RanksDataResponse":{"type":"object","properties":{"ranks":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"string","description":"Rank level"},"minPoints":{"type":"string","description":"Minimum points required for this rank"}}}},"rate":{"type":"number","description":"Points calculation rate"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/ranks":{"get":{"tags":["General"],"summary":"Get user ranks","responses":{"200":{"description":"Ranks retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RanksDataResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /referrals/code-exists

> Check if referral code exists

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/code-exists":{"get":{"tags":["Referrals"],"summary":"Check if referral code exists","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string"},"description":"Referral code to check"}],"responses":{"200":{"description":"Code existence checked successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /referrals/link

> Link referral code

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/link":{"post":{"tags":["Referrals"],"summary":"Link referral code","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Referral code to link"}}}}}},"responses":{"200":{"description":"Referral code linked successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /referrals/me

> Get user referral data

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"UserReferralDataResponse":{"type":"object","properties":{"referralPendingPayout":{"type":"number","description":"Pending referral payout amount"},"tradingFees":{"type":"number","description":"Trading fees from referrals"},"ownReferralCode":{"type":"string","nullable":true,"description":"User's own referral code"},"ownReferralCodeEarnPercentage":{"type":"number","nullable":true,"description":"Percentage earned from own referral code"},"referredUsers":{"type":"array","items":{"type":"object","properties":{"referralGeneratedAmount":{"type":"number","description":"Amount generated from this referral"},"referralTradingVolume":{"type":"number","description":"Trading volume from this referral"},"createdAt":{"type":"string","description":"When the referral was created"},"publicKey":{"type":"string","description":"Public key of the referred user"}}}},"referredByPublicKey":{"type":"string","nullable":true,"description":"Public key of the user who referred this user"},"totalReferredUsers":{"type":"number","description":"Total number of referred users"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/me":{"get":{"tags":["Referrals"],"summary":"Get user referral data","responses":{"200":{"description":"User referral data retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserReferralDataResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /referrals/me

> Create referral code

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CreateReferralCodeResponse":{"type":"object","properties":{"code":{"type":"string","description":"The created referral code"},"earnPercentage":{"type":"number","description":"Percentage earned from referrals"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/me":{"post":{"tags":["Referrals"],"summary":"Create referral code","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Referral code to create"}}}}}},"responses":{"200":{"description":"Referral code created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CreateReferralCodeResponse"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /referrals/me/payout/in-progress

> Check referral payout progress

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutProgress":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Unix timestamp when the payout process expires"},"inProgress":{"type":"boolean","description":"Whether a payout is currently in progress"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/me/payout/in-progress":{"get":{"tags":["Referrals"],"summary":"Check referral payout progress","responses":{"200":{"description":"Payout progress retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutProgress"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /referrals/me/payout/request

> Request referral payout

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutRequestResponse":{"type":"object","properties":{"serialisedTransaction":{"type":"string","description":"Serialized transaction ready for signing"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"},"nonce":{"type":"number","description":"Transaction nonce"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/me/payout/request":{"post":{"tags":["Referrals"],"summary":"Request referral payout","responses":{"200":{"description":"Payout requested successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutRequestResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /referrals/me/payout/submit

> Submit referral payout transaction

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/referrals/me/payout/submit":{"post":{"tags":["Referrals"],"summary":"Submit referral payout transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signed_tx","blockhash","lastValidBlockHeight","nonce"],"properties":{"signed_tx":{"type":"string","description":"Signed transaction"},"blockhash":{"type":"string","description":"Recent blockhash"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height"},"nonce":{"type":"string","description":"Transaction nonce"}}}}}},"responses":{"200":{"description":"Payout submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /tickets/exchange-rate

> Get ticket exchange rate

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"TicketsExchangeRateResponse":{"type":"number","description":"Exchange rate for tickets to SOL"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/tickets/exchange-rate":{"get":{"tags":["Tickets"],"summary":"Get ticket exchange rate","responses":{"200":{"description":"Exchange rate retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TicketsExchangeRateResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /tickets/max-amount

> Get maximum ticket amount

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"TicketsMaxAmountResponse":{"type":"number","description":"Maximum number of tickets that can be cashed out"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/tickets/max-amount":{"get":{"tags":["Tickets"],"summary":"Get maximum ticket amount","responses":{"200":{"description":"Maximum amount retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TicketsMaxAmountResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /tickets/payout/in-progress

> Check ticket payout progress

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutProgress":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Unix timestamp when the payout process expires"},"inProgress":{"type":"boolean","description":"Whether a payout is currently in progress"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/tickets/payout/in-progress":{"get":{"tags":["Tickets"],"summary":"Check ticket payout progress","responses":{"200":{"description":"Payout progress retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutProgress"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /tickets/payout/request

> Request ticket payout

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutRequestResponse":{"type":"object","properties":{"serialisedTransaction":{"type":"string","description":"Serialized transaction ready for signing"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"},"nonce":{"type":"number","description":"Transaction nonce"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/tickets/payout/request":{"post":{"tags":["Tickets"],"summary":"Request ticket payout","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tickets"],"properties":{"tickets":{"type":"integer","minimum":1,"description":"Number of tickets to cash out"}}}}}},"responses":{"200":{"description":"Payout requested successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutRequestResponse"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /tickets/payout/submit

> Submit ticket payout transaction

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/tickets/payout/submit":{"post":{"tags":["Tickets"],"summary":"Submit ticket payout transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signed_tx","blockhash","lastValidBlockHeight","nonce"],"properties":{"signed_tx":{"type":"string","description":"Signed transaction"},"blockhash":{"type":"string","description":"Recent blockhash"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height"},"nonce":{"type":"string","description":"Transaction nonce"}}}}}},"responses":{"200":{"description":"Payout submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /transaction/status

> Check transaction status

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/transaction/status":{"get":{"tags":["Transactions"],"summary":"Check transaction status","parameters":[{"name":"signature","in":"query","required":true,"schema":{"type":"string"},"description":"Transaction signature to check"}],"responses":{"200":{"description":"Transaction status retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /transaction/sign

> Sign a transaction

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/transaction/sign":{"post":{"tags":["Transactions"],"summary":"Sign a transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["serialisedTx","mint","blockhash","lastValidBlockHeight"],"properties":{"serialisedTx":{"type":"string","description":"Serialized transaction data"},"mint":{"type":"string","description":"Coin mint address"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"}}}}}},"responses":{"200":{"description":"Transaction signed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/coin/{address}/trade-metrics

> Get user coin trade metrics

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"UserTradeMetricsResponse":{"type":"object","nullable":true,"properties":{"totalBoughtCoin":{"type":"string","description":"Total coins bought"},"totalSoldCoin":{"type":"string","description":"Total coins sold"},"costBasisSol":{"type":"string","description":"Cost basis in SOL"},"costBasisUsd":{"type":"string","description":"Cost basis in USD"},"realizedPnlSol":{"type":"string","description":"Realized PnL in SOL"},"realizedPnlUsd":{"type":"string","description":"Realized PnL in USD"},"volumeSol":{"type":"string","description":"Trading volume in SOL"},"volumeUsd":{"type":"string","description":"Trading volume in USD"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/coin/{address}/trade-metrics":{"get":{"tags":["User"],"summary":"Get user coin trade metrics","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"description":"Coin address/mint"}],"responses":{"200":{"description":"Trade metrics retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserTradeMetricsResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/coins

> Get user created coins

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/coins":{"get":{"tags":["User"],"summary":"Get user created coins","responses":{"200":{"description":"User created coins retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Coin"}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/creator-rewards/payout/in-progress

> Check creator rewards payout progress

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutProgress":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Unix timestamp when the payout process expires"},"inProgress":{"type":"boolean","description":"Whether a payout is currently in progress"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/creator-rewards/payout/in-progress":{"get":{"tags":["User"],"summary":"Check creator rewards payout progress","responses":{"200":{"description":"Payout progress retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutProgress"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /user/creator-rewards/payout/request

> Request creator rewards payout

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PayoutRequestResponse":{"type":"object","properties":{"serialisedTransaction":{"type":"string","description":"Serialized transaction ready for signing"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"},"nonce":{"type":"number","description":"Transaction nonce"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/creator-rewards/payout/request":{"post":{"tags":["User"],"summary":"Request creator rewards payout","responses":{"200":{"description":"Payout requested successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PayoutRequestResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## POST /user/creator-rewards/payout/submit

> Submit creator rewards payout transaction

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/creator-rewards/payout/submit":{"post":{"tags":["User"],"summary":"Submit creator rewards payout transaction","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signed_tx","blockhash","lastValidBlockHeight","nonce"],"properties":{"signed_tx":{"type":"string","description":"Signed transaction"},"blockhash":{"type":"string","description":"Recent blockhash"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height"},"nonce":{"type":"string","description":"Transaction nonce"}}}}}},"responses":{"200":{"description":"Payout submitted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckTransactionResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/favorites

> Get user favorite coins

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/favorites":{"get":{"tags":["User"],"summary":"Get user favorite coins","responses":{"200":{"description":"User favorites retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Coin"}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/holdings

> Get user coin holdings

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"UserHolding":{"type":"object","properties":{"amount":{"type":"string"},"coin":{"$ref":"#/components/schemas/Coin"}}},"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/holdings":{"get":{"tags":["User"],"summary":"Get user coin holdings","parameters":[{"name":"solPriceUsd","in":"query","schema":{"type":"number"},"description":"SOL price in USD"}],"responses":{"200":{"description":"User holdings retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserHolding"}},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/points/history

> Get user points history

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"PointsHistoryResponse":{"type":"array","items":{"$ref":"#/components/schemas/PointsHistoryItem"},"description":"Array of user points history"},"PointsHistoryItem":{"type":"object","properties":{"timestamp":{"type":"number","description":"Unix timestamp"},"points":{"type":"number","description":"Points amount"},"tradingVolume":{"type":"number","description":"Trading volume amount"}}},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/points/history":{"get":{"tags":["User"],"summary":"Get user points history","responses":{"200":{"description":"Points history retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PointsHistoryResponse"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/preferences

> Get user preferences

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"paths":{"/user/preferences":{"get":{"tags":["User"],"summary":"Get user preferences","responses":{"200":{"description":"User preferences retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserPreferences"},"message":{"type":"string"}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"UserPreferences":{"type":"object","properties":{"bribeAmount":{"type":"number","nullable":true},"priorityFeeAmount":{"type":"number","nullable":true},"maxFee":{"type":"number","nullable":true},"quickBuy":{"type":"boolean"},"quickBuy1":{"type":"number"},"quickBuy2":{"type":"number"},"quickBuy3":{"type":"number"},"sellPrefersCoin":{"type":"boolean"},"hideNsfw":{"type":"boolean"},"maxSlippage":{"type":"number","nullable":true},"selectedQuickBuy":{"type":"number"},"autoSortingEnabled":{"type":"boolean"},"username":{"type":"string","nullable":true},"usernameUpdatedAt":{"type":"string","nullable":true},"points":{"type":"number"},"tickets":{"type":"number"},"creatorPayout":{"type":"number"},"pointsPumpFun":{"type":"number"},"antiMevProtection":{"type":"boolean"},"tradingSettingsAuto":{"type":"boolean"},"sidebarOpen":{"type":"boolean"},"revealedBonusPoints":{"type":"boolean"}},"required":["quickBuy","quickBuy1","quickBuy2","quickBuy3","sellPrefersCoin","hideNsfw","selectedQuickBuy","autoSortingEnabled","points","tickets","creatorPayout","pointsPumpFun","antiMevProtection","tradingSettingsAuto","sidebarOpen","revealedBonusPoints"]},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## PATCH /user/preferences

> Update user preferences

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"UserPreferences":{"type":"object","properties":{"bribeAmount":{"type":"number","nullable":true},"priorityFeeAmount":{"type":"number","nullable":true},"maxFee":{"type":"number","nullable":true},"quickBuy":{"type":"boolean"},"quickBuy1":{"type":"number"},"quickBuy2":{"type":"number"},"quickBuy3":{"type":"number"},"sellPrefersCoin":{"type":"boolean"},"hideNsfw":{"type":"boolean"},"maxSlippage":{"type":"number","nullable":true},"selectedQuickBuy":{"type":"number"},"autoSortingEnabled":{"type":"boolean"},"username":{"type":"string","nullable":true},"usernameUpdatedAt":{"type":"string","nullable":true},"points":{"type":"number"},"tickets":{"type":"number"},"creatorPayout":{"type":"number"},"pointsPumpFun":{"type":"number"},"antiMevProtection":{"type":"boolean"},"tradingSettingsAuto":{"type":"boolean"},"sidebarOpen":{"type":"boolean"},"revealedBonusPoints":{"type":"boolean"}},"required":["quickBuy","quickBuy1","quickBuy2","quickBuy3","sellPrefersCoin","hideNsfw","selectedQuickBuy","autoSortingEnabled","points","tickets","creatorPayout","pointsPumpFun","antiMevProtection","tradingSettingsAuto","sidebarOpen","revealedBonusPoints"]},"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/preferences":{"patch":{"tags":["User"],"summary":"Update user preferences","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPreferences"}}}},"responses":{"200":{"description":"User preferences updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserPreferences"},"message":{"type":"string"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /user/tickets

> Get user tickets

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"servers":[{"url":"/api/v1","description":"API v1 endpoints"}],"security":[{"sessionAuth":[]}],"components":{"securitySchemes":{"sessionAuth":{"type":"apiKey","in":"cookie","name":"next-auth.session-token","description":"Session authentication cookie"}},"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}},"paths":{"/user/tickets":{"get":{"tags":["User"],"summary":"Get user tickets","responses":{"200":{"description":"User tickets retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"number"},"message":{"type":"string"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## The Error object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"Error":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"}}}}}}
```

## The Coin object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}}}}}
```

## The CandlestickData object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CandlestickData":{"type":"object","properties":{"time":{"type":"number"},"open":{"type":"string"},"high":{"type":"string"},"low":{"type":"string"},"close":{"type":"string"},"volume":{"type":"string"}}}}}}
```

## The CoinComment object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CoinComment":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"user":{"type":"object","properties":{"username":{"type":"string"},"image":{"type":"string"},"publicKey":{"type":"string"}}}}}}}}
```

## The CoinTrade object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CoinTrade":{"type":"object","properties":{"publicKey":{"type":"string"},"isBuy":{"type":"boolean"},"time":{"type":"number"},"price":{"type":"string"},"amount":{"type":"number"},"totalUsd":{"type":"number"},"signature":{"type":"string"},"solAmount":{"type":"number"}}}}}}
```

## The CoinHolder object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CoinHolder":{"type":"object","properties":{"address":{"type":"string"},"amount":{"type":"string"}}}}}}
```

## The UserPreferences object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"UserPreferences":{"type":"object","properties":{"bribeAmount":{"type":"number","nullable":true},"priorityFeeAmount":{"type":"number","nullable":true},"maxFee":{"type":"number","nullable":true},"quickBuy":{"type":"boolean"},"quickBuy1":{"type":"number"},"quickBuy2":{"type":"number"},"quickBuy3":{"type":"number"},"sellPrefersCoin":{"type":"boolean"},"hideNsfw":{"type":"boolean"},"maxSlippage":{"type":"number","nullable":true},"selectedQuickBuy":{"type":"number"},"autoSortingEnabled":{"type":"boolean"},"username":{"type":"string","nullable":true},"usernameUpdatedAt":{"type":"string","nullable":true},"points":{"type":"number"},"tickets":{"type":"number"},"creatorPayout":{"type":"number"},"pointsPumpFun":{"type":"number"},"antiMevProtection":{"type":"boolean"},"tradingSettingsAuto":{"type":"boolean"},"sidebarOpen":{"type":"boolean"},"revealedBonusPoints":{"type":"boolean"}},"required":["quickBuy","quickBuy1","quickBuy2","quickBuy3","sellPrefersCoin","hideNsfw","selectedQuickBuy","autoSortingEnabled","points","tickets","creatorPayout","pointsPumpFun","antiMevProtection","tradingSettingsAuto","sidebarOpen","revealedBonusPoints"]}}}}
```

## The GameHistory object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"GameHistory":{"type":"object","properties":{"id":{"type":"string"},"tickets":{"type":"number"},"solAmount":{"type":"string"},"createdAt":{"type":"string"},"multiplier":{"type":"number"},"signature":{"type":"string"},"status":{"type":"string"},"hash":{"type":"string"},"seed":{"type":"string"},"state":{"type":"array","items":{"type":"number"},"nullable":true,"description":"Game state as array of numbers"},"updatedAt":{"type":"string"},"awardedPoints":{"type":"number"}}}}}}
```

## The GameCreateResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"GameCreateResponse":{"type":"object","properties":{"gameId":{"type":"string","description":"Unique identifier for the created game"},"updatedTickets":{"type":"number","description":"User's remaining tickets after game creation"},"gameHashed":{"type":"string","description":"Hashed game data for verification"}}}}}}
```

## The GameUpdateResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"GameUpdateResponse":{"type":"object","properties":{"newPositions":{"type":"array","items":{"type":"number"},"description":"New revealed positions in the game grid"},"multiplier":{"type":"number","description":"Current multiplier for the game"},"isMatch":{"type":"boolean","description":"Whether the current move resulted in a match"},"payoutAmount":{"type":"string","nullable":true,"description":"Payout amount if game is won"},"state":{"type":"array","items":{"type":"number"},"nullable":true,"description":"Current game state"}}}}}}
```

## The PayoutRequestResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"PayoutRequestResponse":{"type":"object","properties":{"serialisedTransaction":{"type":"string","description":"Serialized transaction ready for signing"},"blockhash":{"type":"string","description":"Recent blockhash for the transaction"},"lastValidBlockHeight":{"type":"number","description":"Last valid block height for the transaction"},"nonce":{"type":"number","description":"Transaction nonce"}}}}}}
```

## The CreateReferralCodeResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CreateReferralCodeResponse":{"type":"object","properties":{"code":{"type":"string","description":"The created referral code"},"earnPercentage":{"type":"number","description":"Percentage earned from referrals"}}}}}}
```

## The TicketsMaxAmountResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"TicketsMaxAmountResponse":{"type":"number","description":"Maximum number of tickets that can be cashed out"}}}}
```

## The TicketsExchangeRateResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"TicketsExchangeRateResponse":{"type":"number","description":"Exchange rate for tickets to SOL"}}}}
```

## The PointsTicketsRateResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"PointsTicketsRateResponse":{"type":"number","description":"Exchange rate value for converting points to tickets"}}}}
```

## The CoinMintResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CoinMintResponse":{"type":"string","description":"Coin mint information"}}}}
```

## The RecentGameItem object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"RecentGameItem":{"type":"object","properties":{"username":{"type":"string","description":"Username of the player"},"solReward":{"type":"string","description":"SOL reward amount"},"numberOfTickets":{"type":"number","description":"Number of tickets used"},"timestamp":{"type":"number","description":"Game timestamp"},"gameId":{"type":"string","description":"Game identifier"}}}}}}
```

## The RecentGamesResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"RecentGamesResponse":{"type":"array","items":{"$ref":"#/components/schemas/RecentGameItem"},"description":"Array of recent game results"},"RecentGameItem":{"type":"object","properties":{"username":{"type":"string","description":"Username of the player"},"solReward":{"type":"string","description":"SOL reward amount"},"numberOfTickets":{"type":"number","description":"Number of tickets used"},"timestamp":{"type":"number","description":"Game timestamp"},"gameId":{"type":"string","description":"Game identifier"}}}}}}
```

## The RanksDataResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"RanksDataResponse":{"type":"object","properties":{"ranks":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"string","description":"Rank level"},"minPoints":{"type":"string","description":"Minimum points required for this rank"}}}},"rate":{"type":"number","description":"Points calculation rate"}}}}}}
```

## The PointsHistoryItem object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"PointsHistoryItem":{"type":"object","properties":{"timestamp":{"type":"number","description":"Unix timestamp"},"points":{"type":"number","description":"Points amount"},"tradingVolume":{"type":"number","description":"Trading volume amount"}}}}}}
```

## The PointsHistoryResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"PointsHistoryResponse":{"type":"array","items":{"$ref":"#/components/schemas/PointsHistoryItem"},"description":"Array of user points history"},"PointsHistoryItem":{"type":"object","properties":{"timestamp":{"type":"number","description":"Unix timestamp"},"points":{"type":"number","description":"Points amount"},"tradingVolume":{"type":"number","description":"Trading volume amount"}}}}}}
```

## The UserReferralDataResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"UserReferralDataResponse":{"type":"object","properties":{"referralPendingPayout":{"type":"number","description":"Pending referral payout amount"},"tradingFees":{"type":"number","description":"Trading fees from referrals"},"ownReferralCode":{"type":"string","nullable":true,"description":"User's own referral code"},"ownReferralCodeEarnPercentage":{"type":"number","nullable":true,"description":"Percentage earned from own referral code"},"referredUsers":{"type":"array","items":{"type":"object","properties":{"referralGeneratedAmount":{"type":"number","description":"Amount generated from this referral"},"referralTradingVolume":{"type":"number","description":"Trading volume from this referral"},"createdAt":{"type":"string","description":"When the referral was created"},"publicKey":{"type":"string","description":"Public key of the referred user"}}}},"referredByPublicKey":{"type":"string","nullable":true,"description":"Public key of the user who referred this user"},"totalReferredUsers":{"type":"number","description":"Total number of referred users"}}}}}}
```

## The UserTradeMetricsResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"UserTradeMetricsResponse":{"type":"object","nullable":true,"properties":{"totalBoughtCoin":{"type":"string","description":"Total coins bought"},"totalSoldCoin":{"type":"string","description":"Total coins sold"},"costBasisSol":{"type":"string","description":"Cost basis in SOL"},"costBasisUsd":{"type":"string","description":"Cost basis in USD"},"realizedPnlSol":{"type":"string","description":"Realized PnL in SOL"},"realizedPnlUsd":{"type":"string","description":"Realized PnL in USD"},"volumeSol":{"type":"string","description":"Trading volume in SOL"},"volumeUsd":{"type":"string","description":"Trading volume in USD"}}}}}}
```

## The CoinCommentCreateResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CoinCommentCreateResponse":{"type":"object","properties":{"id":{"type":"string","description":"Comment ID"},"mint":{"type":"string","description":"Coin mint address"},"message":{"type":"string","description":"Comment message"},"userId":{"type":"string","description":"User ID who created the comment"},"createdAt":{"type":"string","format":"date-time","description":"When the comment was created"}}}}}}
```

## The PayoutProgress object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"PayoutProgress":{"type":"object","properties":{"expiresAt":{"type":"number","description":"Unix timestamp when the payout process expires"},"inProgress":{"type":"boolean","description":"Whether a payout is currently in progress"}}}}}}
```

## The UserHolding object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"UserHolding":{"type":"object","properties":{"amount":{"type":"string"},"coin":{"$ref":"#/components/schemas/Coin"}}},"Coin":{"type":"object","properties":{"address":{"type":"string"},"coinSymbol":{"type":"string"},"coinName":{"type":"string"},"coinSrc":{"type":"string"},"coinCreationTime":{"type":"number"},"coinMarketCap":{"type":"number"},"username":{"type":"string"},"holders":{"type":"number"},"comments":{"type":"number"},"xUrl":{"type":"string"},"websiteUrl":{"type":"string"},"featured":{"type":"boolean"},"coinAmount":{"type":"string"},"solPrice":{"type":"number"},"solAmount":{"type":"string"},"bondingCurve":{"type":"string"},"creator":{"type":"string"},"coinDescription":{"type":"string"},"bondingCurveComplete":{"type":"boolean"},"raydiumPoolAddress":{"type":"string"},"migratedToRaydiumAt":{"type":"string","nullable":true}}}}}}
```

## The TransactionStatus object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"}}}}
```

## The CheckTransactionResponse object

```json
{"openapi":"3.1.0","info":{"title":"API v1","version":"1.0.0"},"components":{"schemas":{"CheckTransactionResponse":{"type":"object","properties":{"signature":{"type":"string","description":"Transaction signature"},"status":{"$ref":"#/components/schemas/TransactionStatus"}},"required":["signature","status"]},"TransactionStatus":{"type":"string","enum":["processing","success","failed","dropped","not_found"],"description":"Status of a blockchain transaction"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sugar.money/documentation/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
