vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
37 stars 22 forks source link

Estimate fees API Graph QL missing values #11696

Closed JonRay15 closed 1 month ago

JonRay15 commented 1 month ago

This party is one I know has volume discounts

query dealTicket {
  estimateFees(
    marketId:"90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e",
    partyId:"bba3b2283a00006ce531dbbb2b33e640c630ec8d9482aa8d4077fbdbb37c4fe4",
    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
      }
  }
}

but I am gettign NULLS back from all discount fields on the API.

{
  "data": {
    "estimateFees": {
      "totalFeeAmount": "1629850",
      "fees": {
        "makerFee": "459113",
        "infrastructureFee": "1147781",
        "liquidityFee": "22956",
        "buyBackFee": "",
        "treasuryFee": "",
        "highVolumeMakerFee": "",
        "makerFeeReferralDiscount": null,
        "makerFeeVolumeDiscount": null,
        "infrastructureFeeReferralDiscount": null,
        "infrastructureFeeVolumeDiscount": null,
        "liquidityFeeReferralDiscount": null,
        "liquidityFeeVolumeDiscount": null
      }
    }
  }
}
JonRay15 commented 1 month ago

This works.

It is missing high voulme maker fee but it cannot know that since it doesnt know who is on the othe side of the trade.

So it is done. Happy.