Skip to content
LogoLogo

OrderPrice

What getOrderPrice returns. Every amount is a decimal string.

declare const : OrderPrice
 
. // what to approve and spend
.
.
.
.
. // who collects it, and the fraction it came from
FieldMeaning
totalThe base-token spend — what the exchange takes.
baseTokenAmountThe same amount, named for what it is.
opcFeeOcean Protocol Community fee.
publishMarketFeeThe publishing market's cut, in its own token.
consumeMarketFeeWhat your market collects — the amount the exchange derived.
consumeMarketThe { address, fee } this quote was priced with, if any.

total is what the exchange wants in, so the OPC cut, its own market fee and the consume-market fee are all already inside it. Do not sum the fields yourself.

consumeMarket travels on the quote so that order charges the fee that was priced, to the address it was priced with.

Replaces v1's OrderPriceAndFees. See pricing.