Skip to content

[API]: Enhance estimateFee to cope with being a maker #11698

Description

@JonRay15

API Overview

Currently the estimateFee API always assumes you are the TAKER and provides output based on that.

it would be great if it behaved differently if you put type:"TYPE_LIMIT".

In that case we could treat the order as if it is NOT the aggressor and return the fees received by you as the maker.

So presumably everything would be zero except for:

  • makerFee
  • highVolumeMakerFee

And we would want to look up the correct value for highVolumeMakerFee based on the party provided.

query dealTicket {
  estimateFees(
    marketId:"90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e",
    partyId:"00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571",
    price:"236900",
    size:"1000",
    timeInForce:TIME_IN_FORCE_GTC,
    side:SIDE_BUY,
    type:TYPE_MARKET
  )
  {
    totalFeeAmount
    fees{
      makerFee
      infrastructureFee
      liquidityFee
      buyBackFee
      treasuryFee
      highVolumeMakerFee
      makerFeeReferralDiscount
      makerFeeVolumeDiscount
      infrastructureFeeReferralDiscount
      infrastructureFeeVolumeDiscount
      liquidityFeeReferralDiscount
      liquidityFeeVolumeDiscount
      }
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    apife-requestA list of reasonably high value API change requests from front end

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions