{
  "openapi": "3.0.3",
  "info": {
    "title": "gonk.fun Public Solana API",
    "version": "1.1.0",
    "description": "Public read-only endpoints for Solana launch settings, token listings and wallet balances. For wallet-approved actions and private sessions, use the linked Gonk guide."
  },
  "externalDocs": {
    "url": "https://gonk.fun/api-guide.md"
  },
  "servers": [
    {
      "url": "https://api.gonk.fun"
    },
    {
      "url": "https://gonk.fun"
    }
  ],
  "paths": {
    "/api/solana/v1/status": {
      "get": {
        "operationId": "getSolanaStatus",
        "summary": "Read live Solana cluster, launch requirements and fees",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolanaStatus"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before retrying",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/solana/v1/coins": {
      "get": {
        "operationId": "listGonkCoins",
        "summary": "List coins launched on gonk.fun",
        "security": [],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Coin ordering",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "mcap",
                "progress"
              ],
              "default": "new"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum entries requested",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Coin"
                      }
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before retrying",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/solana/v1/coins/{mint}": {
      "get": {
        "operationId": "getGonkCoin",
        "summary": "Read coin details and recent indexed trades",
        "security": [],
        "parameters": [
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "Solana mint address",
            "schema": {
              "type": "string",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Coin"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before retrying",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/solana/v1/holdings/{wallet}/{mint}": {
      "get": {
        "operationId": "getTokenBalance",
        "summary": "Read a public Solana wallet balance for a single token",
        "security": [],
        "parameters": [
          {
            "name": "wallet",
            "in": "path",
            "required": true,
            "description": "Public wallet address",
            "schema": {
              "type": "string",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            }
          },
          {
            "name": "mint",
            "in": "path",
            "required": true,
            "description": "Token mint. Use So11111111111111111111111111111111111111112 for native SOL.",
            "schema": {
              "type": "string",
              "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenBalance"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before retrying",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/api/solana/v1/quotes": {
      "get": {
        "operationId": "listLaunchQuoteTokens",
        "summary": "List supported quote tokens for site launches",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items"
                  ],
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            },
            "headers": {
              "RateLimit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Policy": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before retrying",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message",
          "resolution"
        ]
      },
      "SolanaStatus": {
        "type": "object",
        "properties": {
          "cluster": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "platformId": {
            "type": "string",
            "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
          },
          "vanityStock": {
            "type": "integer"
          },
          "fees": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "launchRequirements": {
            "type": "object",
            "properties": {
              "baseLamports": {
                "type": "string"
              },
              "firstBuyExtraLamports": {
                "type": "string"
              },
              "holderRewardsExtraLamports": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "cluster",
          "ready"
        ]
      },
      "Coin": {
        "type": "object",
        "properties": {
          "mint": {
            "type": "string",
            "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
          },
          "pool": {
            "type": "string",
            "nullable": true
          },
          "creator": {
            "type": "string",
            "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "priceSol": {
            "type": "number",
            "nullable": true
          },
          "mcapSol": {
            "type": "number",
            "nullable": true
          },
          "trades": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sig": {
                  "type": "string"
                },
                "trader": {
                  "type": "string",
                  "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "buy",
                    "sell"
                  ]
                },
                "sol": {
                  "type": "number"
                },
                "tokens": {
                  "type": "number"
                },
                "time": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "required": [
          "mint",
          "name",
          "symbol"
        ]
      },
      "TokenBalance": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "raw": {
            "type": "string"
          },
          "decimals": {
            "type": "integer",
            "nullable": true
          }
        },
        "required": [
          "amount"
        ]
      }
    }
  }
}
