Estimate fee
GET/api/v2/estimate/fee
Estimate the fee that would be incurred for submitting an order with the specified price and size on the market.
Request
Query Parameters
Market ID, used to specify the fee factors.
Price at which the potential order is expected to trade.
Size at which the potential order is expected to trade.
Party ID, used to get discount details.
Responses
- 200
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
fee object
Summary of the estimated fees for this order if it were to trade now.
Fee amount used to purchase governance tokens via regular auctions (network wide).
Fee paid by the taker to the maker if the maker is eligible.
Fee amount paid for maintaining the Vega infrastructure. This field is an unsigned integer scaled using the asset's decimal places.
Discount on infrastructure fee for eligible referrer.
Discount on infrastructure fee based on the taker volume.
Fee amount paid to market makers. This field is an unsigned integer scaled to the asset's decimal places.
Discount on liquidity fee for eligible referrer.
Discount on liquidity fee basedo on taker volume.
Fee amount paid to the non-aggressive party of the trade. This field is an unsigned integer scaled to the asset's decimal places.
Referrer discounts. Discount on maker fee for eligible referrer.
Volume discounts. Discount on maker fee based on the taker volume.
Fee amount sent to network treasury for later use based on governance actions (network wide).
{
"fee": {
"buyBackFee": "string",
"highVolumeMakerFee": "string",
"infrastructureFee": "string",
"infrastructureFeeReferrerDiscount": "string",
"infrastructureFeeVolumeDiscount": "string",
"liquidityFee": "string",
"liquidityFeeReferrerDiscount": "string",
"liquidityFeeVolumeDiscount": "string",
"makerFee": "string",
"makerFeeReferrerDiscount": "string",
"makerFeeVolumeDiscount": "string",
"treasuryFee": "string"
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- If no scheme is provided,
https
is assumed. - An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error.
- Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
- ]
details object[]
A URL/resource name that uniquely identifies the type of the serialized
protocol buffer message. This string must contain at least
one "/" character. The last segment of the URL's path must represent
the fully qualified name of the type (as in
path/google.protobuf.Duration
). The name should be in a canonical form
(e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they
expect it to use in the context of Any. However, for URLs which use the
scheme http
, https
, or no scheme, one can optionally set up a type
server that maps type URLs to message definitions as follows:
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com.
Schemes other than http
, https
(or the empty scheme) might be
used with implementation specific semantics.
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}