-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger-spec.json
1 lines (1 loc) · 3.25 KB
/
swagger-spec.json
1
{"openapi":"3.0.0","paths":{"/v1/pairs":{"get":{"operationId":"PairController_getPairs_v1","parameters":[],"responses":{"200":{"description":"List of all trading pairs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PairDto"}}}}}},"summary":"Get all pairs","tags":["pairs"]}},"/v1/pairs/{address}":{"get":{"operationId":"PairController_getPairFromAddress_v1","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The pair information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairDto"}}}},"400":{"description":"Invalid address format"},"404":{"description":"Pair not found"}},"summary":"Get specific pair by address","tags":["pairs"]}},"/v1/tokens":{"get":{"operationId":"TokenController_getTokens_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["tokens"]}},"/v1/tokens/{address}":{"get":{"operationId":"TokenController_getTokenFromAddress_v1","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["tokens"]}},"/health":{"get":{"operationId":"HealthController_getHealth","parameters":[],"responses":{"200":{"description":""}},"tags":["health"]}}},"info":{"title":"Reservoir Finance API","description":"","version":"0.1.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"PairDto":{"type":"object","properties":{"address":{"type":"string","description":"The pair contract address","example":"0x2b6fc877ff5535b50f6c3e068bb436b16ec76fc5"},"curveId":{"type":"number","description":"Curve ID. 0 for constant product. 1 for stable","example":1},"token0":{"type":"object","description":"First token in the pair","additionalProperties":true},"token1":{"type":"object","description":"Second token in the pair","additionalProperties":true},"price":{"type":"string","description":"Current price ratio between tokens","example":"13.648737925900864974"},"swapFee":{"type":"string","description":"Fee charged on each swap (e.g. \"1%\")","example":"1%"},"platformFee":{"type":"string","description":"Platform fee percentage (e.g. \"25%\")","example":"25%"},"token0Reserve":{"type":"string","description":"Reserve amount of token0","example":"5456454"},"token1Reserve":{"type":"string","description":"Reserve amount of token1","example":"5456454"},"token0Volume":{"type":"string","description":"24h volume for token0","example":"4665940.498116731766938627"},"token1Volume":{"type":"string","description":"24h volume for token1","example":"336487.684316643656557238"},"token0Managed":{"type":"string","description":"Amount of token0Managed","example":"336487.684316643656557238"},"token1Managed":{"type":"string","description":"Amount of token1Managed","example":"336487.684316643656557238"},"swapApr":{"type":"number","description":"APR for swaps, expressed as a percentage","example":"10.5"},"supplyApr":{"type":"number","description":"APR for supplying liquidity","example":"3.5"}},"required":["address","curveId","token0","token1","price","swapFee","platformFee","token0Reserve","token1Reserve","token0Volume","token1Volume","token0Managed","token1Managed"]}}}}