Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JonRay15 opened this issue Sep 18, 2024 · 1 comment
Open

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

JonRay15 opened this issue Sep 18, 2024 · 1 comment
Labels
api fe-request A list of reasonably high value API change requests from front end

Comments

@JonRay15
Copy link

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
      }
  }
}
@JonRay15 JonRay15 added the api label Sep 18, 2024
@JonRay15 JonRay15 added the fe-request A list of reasonably high value API change requests from front end label Sep 18, 2024
@EVODelavega
Copy link
Contributor

Since the API returns all fees, it seems to me like this could easily be handled by the front-end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api fe-request A list of reasonably high value API change requests from front end
Projects
Status: No status
Development

No branches or pull requests

2 participants