# Reference

## GET /meta/swap

>

```json
{"openapi":"3.0.3","info":{"title":"Meta API","version":"1.0.0"},"tags":[],"paths":{"/meta/swap":{"get":{"parameters":[{"description":"The tokenIn address","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"tokenIn","required":true},{"description":"The tokenOut address","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"tokenOut","required":true},{"description":"The amount of tokenIn used in the swap","schema":{"exclusiveMinimum":0,"anyOf":[{"format":"numeric","type":"string"},{"exclusiveMinimum":0,"description":"The amount of tokenIn used in the swap","type":"number"}]},"in":"query","name":"amount","required":true},{"description":"The address to send the output to","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"to","required":false},{"description":"The maximum slippage allowed in the swap as a decimal fraction, for example 0.005 for 0.5% slippage. 0 < maxSlippage < 1","schema":{"minimum":0,"maximum":1,"default":0.01,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":0,"maximum":1,"default":0.01,"description":"The maximum slippage allowed in the swap as a decimal fraction, for example 0.005 for 0.5% slippage. 0 < maxSlippage < 1","type":"number"}]},"in":"query","name":"maxSlippage","required":true},{"description":"The aggregators to use in the swap","schema":{"type":"array","items":{"anyOf":[{"const":"hyperBloom","type":"string"},{"const":"openOcean","type":"string"},{"const":"liquidSwap","type":"string"},{"const":"kyberSwap","type":"string"},{"const":"oogaBooga","type":"string"},{"const":"lifi","type":"string"},{"const":"bebop","type":"string"},{"const":"gluex","type":"string"},{"const":"enso","type":"string"},{"const":"eisen","type":"string"},{"const":"hyperflow","type":"string"},{"const":"fibrous","type":"string"},{"const":"nordstern","type":"string"}]}},"in":"query","name":"aggregators","required":false},{"description":"The aggregators to not use in the swap","schema":{"type":"array","items":{"anyOf":[{"const":"hyperBloom","type":"string"},{"const":"openOcean","type":"string"},{"const":"liquidSwap","type":"string"},{"const":"kyberSwap","type":"string"},{"const":"oogaBooga","type":"string"},{"const":"lifi","type":"string"},{"const":"bebop","type":"string"},{"const":"gluex","type":"string"},{"const":"enso","type":"string"},{"const":"eisen","type":"string"},{"const":"hyperflow","type":"string"},{"const":"fibrous","type":"string"},{"const":"nordstern","type":"string"}]}},"in":"query","name":"aggregatorsBlacklist","required":false},{"description":"Whether to simulate the quotes","schema":{"type":"boolean"},"in":"query","name":"simulate","required":false},{"description":"The referral code to use in the swap","schema":{"anyOf":[{"format":"numeric","default":0,"type":"string"},{"description":"The referral code to use in the swap","type":"number"}]},"in":"query","name":"referralCode","required":false}],"responses":{"200":{"items":{"type":"object","properties":{"amountIn":{"description":"The amount of tokenIn used in the swap","type":"bigint"},"aggregator":{"description":"The aggregator used in the swap","type":"string"},"amountOut":{"description":"The amount of tokenOut quoted by the dex-aggregator provider","type":"bigint"},"minAmountOut":{"description":"The minimum amount of tokenOut that will be received in the swap calculated from the simulationAmountOut and maxSlippage provided","type":"bigint"},"simulationAmountOut":{"description":"The amount of tokenOut received in the on-chain simulation and encoded in the transaction","type":"bigint"},"priceImpact":{"nullable":true,"anyOf":[{"description":"The price impact of the swap, in basis points, for example 0.0004 for 0.04%","type":"number"},{"type":"null"}]},"fee":{"description":"The fee paid in the swap denominated in outputToken wei","type":"bigint"},"gas":{"description":"The gas used in the swap","type":"bigint"},"value":{"description":"The value sent in the swap","type":"bigint"},"routerAddr":{"description":"The router address used in the swap. Only shown if recipient is provided","title":"EVM Address","type":"string","pattern":"^0x(.*)$"},"calldata":{"description":"The calldata used in the swap. Only shown if recipient is provided","type":"string"},"status":{"description":"The status of the swap","const":"Success","type":"string"}},"required":["amountIn","aggregator","amountOut","minAmountOut","priceImpact","fee","value","status"]},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"amountIn":{"description":"The amount of tokenIn used in the swap","type":"bigint"},"aggregator":{"description":"The aggregator used in the swap","type":"string"},"amountOut":{"description":"The amount of tokenOut quoted by the dex-aggregator provider","type":"bigint"},"minAmountOut":{"description":"The minimum amount of tokenOut that will be received in the swap calculated from the simulationAmountOut and maxSlippage provided","type":"bigint"},"simulationAmountOut":{"description":"The amount of tokenOut received in the on-chain simulation and encoded in the transaction","type":"bigint"},"priceImpact":{"nullable":true,"anyOf":[{"description":"The price impact of the swap, in basis points, for example 0.0004 for 0.04%","type":"number"},{"type":"null"}]},"fee":{"description":"The fee paid in the swap denominated in outputToken wei","type":"bigint"},"gas":{"description":"The gas used in the swap","type":"bigint"},"value":{"description":"The value sent in the swap","type":"bigint"},"routerAddr":{"description":"The router address used in the swap. Only shown if recipient is provided","title":"EVM Address","type":"string","pattern":"^0x(.*)$"},"calldata":{"description":"The calldata used in the swap. Only shown if recipient is provided","type":"string"},"status":{"description":"The status of the swap","const":"Success","type":"string"}},"required":["amountIn","aggregator","amountOut","minAmountOut","priceImpact","fee","value","status"]}}},"multipart/form-data":{"schema":{"type":"array","items":{"type":"object","properties":{"amountIn":{"description":"The amount of tokenIn used in the swap","type":"bigint"},"aggregator":{"description":"The aggregator used in the swap","type":"string"},"amountOut":{"description":"The amount of tokenOut quoted by the dex-aggregator provider","type":"bigint"},"minAmountOut":{"description":"The minimum amount of tokenOut that will be received in the swap calculated from the simulationAmountOut and maxSlippage provided","type":"bigint"},"simulationAmountOut":{"description":"The amount of tokenOut received in the on-chain simulation and encoded in the transaction","type":"bigint"},"priceImpact":{"nullable":true,"anyOf":[{"description":"The price impact of the swap, in basis points, for example 0.0004 for 0.04%","type":"number"},{"type":"null"}]},"fee":{"description":"The fee paid in the swap denominated in outputToken wei","type":"bigint"},"gas":{"description":"The gas used in the swap","type":"bigint"},"value":{"description":"The value sent in the swap","type":"bigint"},"routerAddr":{"description":"The router address used in the swap. Only shown if recipient is provided","title":"EVM Address","type":"string","pattern":"^0x(.*)$"},"calldata":{"description":"The calldata used in the swap. Only shown if recipient is provided","type":"string"},"status":{"description":"The status of the swap","const":"Success","type":"string"}},"required":["amountIn","aggregator","amountOut","minAmountOut","priceImpact","fee","value","status"]}}},"text/plain":{"schema":{"type":"array","items":{"type":"object","properties":{"amountIn":{"description":"The amount of tokenIn used in the swap","type":"bigint"},"aggregator":{"description":"The aggregator used in the swap","type":"string"},"amountOut":{"description":"The amount of tokenOut quoted by the dex-aggregator provider","type":"bigint"},"minAmountOut":{"description":"The minimum amount of tokenOut that will be received in the swap calculated from the simulationAmountOut and maxSlippage provided","type":"bigint"},"simulationAmountOut":{"description":"The amount of tokenOut received in the on-chain simulation and encoded in the transaction","type":"bigint"},"priceImpact":{"nullable":true,"anyOf":[{"description":"The price impact of the swap, in basis points, for example 0.0004 for 0.04%","type":"number"},{"type":"null"}]},"fee":{"description":"The fee paid in the swap denominated in outputToken wei","type":"bigint"},"gas":{"description":"The gas used in the swap","type":"bigint"},"value":{"description":"The value sent in the swap","type":"bigint"},"routerAddr":{"description":"The router address used in the swap. Only shown if recipient is provided","title":"EVM Address","type":"string","pattern":"^0x(.*)$"},"calldata":{"description":"The calldata used in the swap. Only shown if recipient is provided","type":"string"},"status":{"description":"The status of the swap","const":"Success","type":"string"}},"required":["amountIn","aggregator","amountOut","minAmountOut","priceImpact","fee","value","status"]}}}}},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"const":"error","type":"string"},"error":{"description":"The error message if the swap failed","type":"string"}},"required":["status","error"]}},"multipart/form-data":{"schema":{"type":"object","properties":{"status":{"const":"error","type":"string"},"error":{"description":"The error message if the swap failed","type":"string"}},"required":["status","error"]}},"text/plain":{"schema":{"type":"object","properties":{"status":{"const":"error","type":"string"},"error":{"description":"The error message if the swap failed","type":"string"}},"required":["status","error"]}}}}},"operationId":"getMetaSwap","tags":["Meta Aggregator"]}}}}
```

## GET /meta/aggregators

>

```json
{"openapi":"3.0.3","info":{"title":"Meta API","version":"1.0.0"},"tags":[],"paths":{"/meta/aggregators":{"get":{"responses":{"200":{"description":"List of available aggregators","items":{"type":"object","properties":{"id":{"description":"The unique identifier of the aggregator","type":"string"},"displayName":{"description":"The display name of the aggregator","type":"string"},"logoUrl":{"description":"The URL to the aggregator logo","type":"string"}},"required":["id","displayName","logoUrl"]},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier of the aggregator","type":"string"},"displayName":{"description":"The display name of the aggregator","type":"string"},"logoUrl":{"description":"The URL to the aggregator logo","type":"string"}},"required":["id","displayName","logoUrl"]}}},"multipart/form-data":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier of the aggregator","type":"string"},"displayName":{"description":"The display name of the aggregator","type":"string"},"logoUrl":{"description":"The URL to the aggregator logo","type":"string"}},"required":["id","displayName","logoUrl"]}}},"text/plain":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"description":"The unique identifier of the aggregator","type":"string"},"displayName":{"description":"The display name of the aggregator","type":"string"},"logoUrl":{"description":"The URL to the aggregator logo","type":"string"}},"required":["id","displayName","logoUrl"]}}}}}},"operationId":"getMetaAggregators","tags":["Meta Aggregator"]}}}}
```

## Stream real-time swap quotes

> Establishes a Server-Sent Events (SSE) stream that provides real-time swap quotes from multiple aggregators. The stream emits various event types including connection status, quotes, errors, heartbeats, and completion notifications.

```json
{"openapi":"3.0.3","info":{"title":"Meta API","version":"1.0.0"},"tags":[],"paths":{"/meta/stream/swap":{"get":{"parameters":[{"description":"The tokenIn address","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"tokenIn","required":true},{"description":"The tokenOut address","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"tokenOut","required":true},{"description":"The amount of tokenIn used in the swap","schema":{"exclusiveMinimum":0,"anyOf":[{"format":"numeric","type":"string"},{"exclusiveMinimum":0,"description":"The amount of tokenIn used in the swap","type":"number"}]},"in":"query","name":"amount","required":true},{"description":"The address to send the output to","schema":{"type":"string","title":"EVM Address","pattern":"^0x(.*)$"},"in":"query","name":"to","required":false},{"description":"The maximum slippage allowed in the swap as a decimal fraction, for example 0.005 for 0.5% slippage. 0 < maxSlippage < 1","schema":{"minimum":0,"maximum":1,"default":0.01,"anyOf":[{"format":"numeric","default":0,"type":"string"},{"minimum":0,"maximum":1,"default":0.01,"description":"The maximum slippage allowed in the swap as a decimal fraction, for example 0.005 for 0.5% slippage. 0 < maxSlippage < 1","type":"number"}]},"in":"query","name":"maxSlippage","required":true},{"description":"The aggregators to use in the swap","schema":{"type":"array","items":{"anyOf":[{"const":"hyperBloom","type":"string"},{"const":"openOcean","type":"string"},{"const":"liquidSwap","type":"string"},{"const":"kyberSwap","type":"string"},{"const":"oogaBooga","type":"string"},{"const":"lifi","type":"string"},{"const":"bebop","type":"string"},{"const":"gluex","type":"string"},{"const":"enso","type":"string"},{"const":"eisen","type":"string"},{"const":"hyperflow","type":"string"},{"const":"fibrous","type":"string"},{"const":"nordstern","type":"string"}]}},"in":"query","name":"aggregators","required":false},{"description":"The aggregators to not use in the swap","schema":{"type":"array","items":{"anyOf":[{"const":"hyperBloom","type":"string"},{"const":"openOcean","type":"string"},{"const":"liquidSwap","type":"string"},{"const":"kyberSwap","type":"string"},{"const":"oogaBooga","type":"string"},{"const":"lifi","type":"string"},{"const":"bebop","type":"string"},{"const":"gluex","type":"string"},{"const":"enso","type":"string"},{"const":"eisen","type":"string"},{"const":"hyperflow","type":"string"},{"const":"fibrous","type":"string"},{"const":"nordstern","type":"string"}]}},"in":"query","name":"aggregatorsBlacklist","required":false},{"description":"Whether to simulate the quotes","schema":{"type":"boolean"},"in":"query","name":"simulate","required":false},{"description":"The referral code to use in the swap","schema":{"anyOf":[{"format":"numeric","default":0,"type":"string"},{"description":"The referral code to use in the swap","type":"number"}]},"in":"query","name":"referralCode","required":false}],"operationId":"getMetaStreamSwap","tags":["Meta Aggregator"],"summary":"Stream real-time swap quotes","description":"Establishes a Server-Sent Events (SSE) stream that provides real-time swap quotes from multiple aggregators. The stream emits various event types including connection status, quotes, errors, heartbeats, and completion notifications.","responses":{"200":{"description":"SSE stream of quote events","content":{"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events formatted string containing quote data"}}}}}}}}}
```
