Skip to content

Commit

Permalink
PriceImprovement quote in OpenAPI (#2850)
Browse files Browse the repository at this point in the history
  • Loading branch information
squadgazzz authored Aug 1, 2024
1 parent d8964a5 commit 2d1b59b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions crates/orderbook/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,23 @@ components:
items:
$ref: "#/components/schemas/CallData"
description: The call data to be used for the interaction.
Quote:
description: |
A calculated order quote.
type: object
properties:
sellAmount:
description: The amount of the sell token.
allOf:
- $ref: "#/components/schemas/TokenAmount"
buyAmount:
description: The amount of the buy token.
allOf:
- $ref: "#/components/schemas/TokenAmount"
fee:
description: The amount that needs to be paid, denominated in the sell token.
allOf:
- $ref: "#/components/schemas/TokenAmount"
Surplus:
description: The protocol fee is taken as a percent of the surplus.
type: object
Expand Down Expand Up @@ -1625,9 +1642,14 @@ components:
minimum: 0.0
maximum: 1.0
exclusiveMaximum: true
quote:
description: The best quote received.
allOf:
- $ref: "#/components/schemas/Quote"
required:
- factor
- maxVolumeFactor
- quote
FeePolicy:
description: Defines the ways to calculate the protocol fee.
oneOf:
Expand Down
2 changes: 2 additions & 0 deletions crates/solvers/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ components:
$ref: "#/components/schemas/TokenAmount"
buy_amount:
$ref: "#/components/schemas/TokenAmount"
fee:
$ref: "#/components/schemas/TokenAmount"
TokenReserve:
description: |
A reserve of tokens in an on-chain liquidity pool.
Expand Down

0 comments on commit 2d1b59b

Please sign in to comment.