{"openapi":"3.1.0","info":{"title":"betterERC Terminal API","version":"1.0.0","description":"Versioned Robinhood Chain launchpad discovery, market data, account data, quotes, streams, and unsigned transaction builders."},"servers":[{"url":"https://api.bettererc.org","description":"Production custom domain"},{"url":"https://launchpad.bettererc.org","description":"Production service origin"}],"tags":[{"name":"Reference"},{"name":"Tokens"},{"name":"Accounts"},{"name":"Trading"},{"name":"Streaming"}],"paths":{"/v1":{"get":{"tags":["Reference"],"summary":"API index","responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/config":{"get":{"tags":["Reference"],"summary":"Chain, contract, ABI, feature, and launch profile configuration","responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/standards":{"get":{"tags":["Reference"],"summary":"BERC standards and extensions","responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/tokens":{"get":{"tags":["Tokens"],"summary":"List launches","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"sort","in":"query","schema":{"type":"string","enum":["launchedAt","volume24h","volume1h","volume5m","marketCap","raised","holders","progress","lastTradeAt","trades24h"]}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"standard","in":"query","schema":{"type":"string","enum":["berc-20","berc-721"]}},{"name":"verified","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"creator","in":"query","schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"$ref":"#/components/responses/PagedSuccess"},"400":{"$ref":"#/components/responses/Error"}}}},"/v1/tokens/batch":{"post":{"tags":["Tokens"],"summary":"Resolve up to 100 anonymous or 250 partner token addresses","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["addresses"],"properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}}}}},"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/tokens/{address}":{"get":{"tags":["Tokens"],"summary":"Get one launch","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"name":"include","in":"query","schema":{"type":"string","example":"holders,trades"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"404":{"$ref":"#/components/responses/Error"}}}},"/v1/tokens/{address}/trades":{"get":{"tags":["Tokens"],"summary":"List token fills","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Since"},{"$ref":"#/components/parameters/Until"}],"responses":{"200":{"$ref":"#/components/responses/PagedSuccess"}}}},"/v1/tokens/{address}/holders":{"get":{"tags":["Tokens"],"summary":"List holders ranked by exact numeric balance","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"$ref":"#/components/responses/PagedSuccess"}}}},"/v1/tokens/{address}/transfers":{"get":{"tags":["Tokens"],"summary":"List ERC-20 transfers","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"},{"name":"account","in":"query","schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"$ref":"#/components/responses/PagedSuccess"}}}},"/v1/tokens/{address}/candles":{"get":{"tags":["Tokens"],"summary":"Read indexed OHLCV candles","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"name":"interval","in":"query","required":true,"schema":{"type":"string","enum":["1m","5m","15m","1h","4h","1d"]}},{"name":"from","in":"query","schema":{"type":"string"}},{"name":"to","in":"query","schema":{"type":"string"}},{"name":"quote","in":"query","schema":{"type":"string","enum":["eth","usd"],"default":"eth"}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"503":{"$ref":"#/components/responses/Error"}}}},"/v1/accounts/{address}/holdings":{"get":{"tags":["Accounts"],"summary":"Get exact balances and current ETH values","parameters":[{"$ref":"#/components/parameters/AddressPath"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/accounts/{address}/trades":{"get":{"tags":["Accounts"],"summary":"List account fills","parameters":[{"$ref":"#/components/parameters/AddressPath"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Cursor"}],"responses":{"200":{"$ref":"#/components/responses/PagedSuccess"}}}},"/v1/accounts/{address}/launches":{"get":{"tags":["Accounts"],"summary":"List launches created by an account","parameters":[{"$ref":"#/components/parameters/AddressPath"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/accounts/{address}/fees":{"get":{"tags":["Accounts"],"summary":"Get creator fee positions","parameters":[{"$ref":"#/components/parameters/AddressPath"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/accounts/{address}/pnl":{"get":{"tags":["Accounts"],"summary":"Get transfer-naive average-cost PnL","parameters":[{"$ref":"#/components/parameters/AddressPath"}],"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/quote":{"get":{"tags":["Trading"],"summary":"Simulate an exact-input v4 quote","parameters":[{"name":"token","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Address"}},{"name":"side","in":"query","required":true,"schema":{"type":"string","enum":["buy","sell"]}},{"name":"amountIn","in":"query","required":true,"schema":{"$ref":"#/components/schemas/RawInteger"}},{"name":"slippageBps","in":"query","schema":{"type":"integer","minimum":1,"maximum":5000,"default":500}}],"responses":{"200":{"$ref":"#/components/responses/Success"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}}}},"/v1/tx/buy":{"post":{"tags":["Trading"],"summary":"Build unsigned buy calldata","security":[{"bearerAuth":[]}],"requestBody":{"$ref":"#/components/requestBodies/Buy"},"responses":{"200":{"$ref":"#/components/responses/Success"},"403":{"$ref":"#/components/responses/Error"}}}},"/v1/tx/sell":{"post":{"tags":["Trading"],"summary":"Build unsigned sell and optional approval calldata","security":[{"bearerAuth":[]}],"requestBody":{"$ref":"#/components/requestBodies/Sell"},"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/tx/launch":{"post":{"tags":["Trading"],"summary":"Build unsigned launch calldata and predict the token address","security":[{"bearerAuth":[]}],"requestBody":{"$ref":"#/components/requestBodies/Launch"},"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/tx/claim-fees":{"post":{"tags":["Trading"],"summary":"Build unsigned creator fee collection calldata","security":[{"bearerAuth":[]}],"requestBody":{"$ref":"#/components/requestBodies/Claim"},"responses":{"200":{"$ref":"#/components/responses/Success"}}}},"/v1/stream/sse":{"get":{"tags":["Streaming"],"summary":"Subscribe to launches, trades, prices, candles, and reorgs over SSE","parameters":[{"name":"channels","in":"query","required":true,"schema":{"type":"string","example":"launches,trades:0xabc...,prices"}},{"name":"Last-Event-ID","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"text/event-stream","content":{"text/event-stream":{"schema":{"type":"string"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"betterERC partner API key"}},"schemas":{"Address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"RawInteger":{"type":"string","pattern":"^[0-9]+$","description":"Base-10 integer in the asset's smallest unit"},"Meta":{"type":"object","required":["chainId","indexedBlock","indexedAt","headBlock","confirmations","lagSeconds","stale"],"properties":{"chainId":{"type":"integer","const":4663},"indexedBlock":{"$ref":"#/components/schemas/RawInteger"},"indexedAt":{"type":"string","format":"date-time"},"headBlock":{"$ref":"#/components/schemas/RawInteger"},"confirmations":{"type":"integer"},"lagSeconds":{"type":"integer"},"stale":{"type":"boolean"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}},"parameters":{"AddressPath":{"name":"address","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Address"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},"Cursor":{"name":"cursor","in":"query","schema":{"type":"string"}},"Since":{"name":"since","in":"query","schema":{"type":"string","description":"Block number or RFC 3339 timestamp"}},"Until":{"name":"until","in":"query","schema":{"type":"string","description":"Block number or RFC 3339 timestamp"}}},"responses":{"Success":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"PagedSuccess":{"description":"Cursor-paginated success","content":{"application/json":{"schema":{"type":"object","required":["data","page","meta"],"properties":{"data":{"type":"array","items":{}},"page":{"type":"object","properties":{"nextCursor":{"type":["string","null"]},"hasMore":{"type":"boolean"}}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"Error":{"description":"Structured error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"requestBodies":{"Buy":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","recipient","amountInWei","minTokensOut"],"properties":{"token":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"},"amountInWei":{"$ref":"#/components/schemas/RawInteger"},"minTokensOut":{"$ref":"#/components/schemas/RawInteger"},"deadlineSeconds":{"type":"integer","default":600}}}}}},"Sell":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","recipient","amountIn","minNativeOut"],"properties":{"token":{"$ref":"#/components/schemas/Address"},"owner":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"},"amountIn":{"$ref":"#/components/schemas/RawInteger"},"minNativeOut":{"$ref":"#/components/schemas/RawInteger"},"deadlineSeconds":{"type":"integer","default":600}}}}}},"Launch":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["creator","name","symbol","metadataUri"],"properties":{"creator":{"$ref":"#/components/schemas/Address"},"name":{"type":"string"},"symbol":{"type":"string"},"metadataUri":{"type":"string"},"salt":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"initialBuyWei":{"$ref":"#/components/schemas/RawInteger"},"minInitialTokensOut":{"$ref":"#/components/schemas/RawInteger"},"deadlineSeconds":{"type":"integer","default":1200}}}}}},"Claim":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["tokenId","creator","recipient"],"properties":{"tokenId":{"$ref":"#/components/schemas/RawInteger"},"creator":{"$ref":"#/components/schemas/Address"},"recipient":{"$ref":"#/components/schemas/Address"}}}}}}}}}