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

Trade API graphQL resolver not including new trade fees #11672

Closed
JonRay15 opened this issue Sep 11, 2024 · 3 comments · Fixed by #11673 or #11694
Closed

Trade API graphQL resolver not including new trade fees #11672

JonRay15 opened this issue Sep 11, 2024 · 3 comments · Fixed by #11673 or #11694
Assignees
Labels

Comments

@JonRay15
Copy link

Treasury fee
Buyback fee
High volume maker fee

Not working

Testing on BTC market

Here are all the trades

https://api.n00.testnet.vega.rocks/api/v2/trades?marketIds=07d83b233cc0c43b8e46b5384bbbb52bd23d27502c20ba180cfb9c690e0ba6be

My trade ID = c63dc855d8c4519220f76bb241d811976e3becb027243c0e6002e32d25e28908

REST API is returning tresury / buyback

"buyerFee": {
"makerFee": "1011904",
"infrastructureFee": "2529759",
"liquidityFee": "50596",
"makerFeeVolumeDiscount": "0",
"infrastructureFeeVolumeDiscount": "0",
"liquidityFeeVolumeDiscount": "0",
"makerFeeReferrerDiscount": "0",
"infrastructureFeeReferrerDiscount": "0",
"liquidityFeeReferrerDiscount": "0",
"treasuryFee": "1517856",
"buyBackFee": "505952",
"highVolumeMakerFee": "0"

But these are not appearing on the graphQL ... admitedly high volume maker fee is 0 here but in another trade I observed it missing ... take my word for it.

@JonRay15 JonRay15 added bug fe-request A list of reasonably high value API change requests from front end labels Sep 11, 2024
@jeremyletang jeremyletang self-assigned this Sep 11, 2024
@JonRay15
Copy link
Author

Looks good now

Image

Hard to verify te maker rebate since I dont have key that would have this

@JonRay15
Copy link
Author

JonRay15 commented Sep 17, 2024

Maker rebate stll not on GQL.... I'm running this

query trades{
	trades(
    filter: {partyIds:["00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571"]}
  		){
    edges{
      node{
        id
        market{
          id
        }
        buyOrder
        sellOrder
        buyer{
          id
        }
        seller{
          id
        }
        aggressor
        price
        size
        createdAt
        type
        buyerFee{
          makerFee
          infrastructureFee
          liquidityFee
          buyBackFee
          treasuryFee
          highVolumeMakerFee
          makerFeeReferralDiscount
          makerFeeVolumeDiscount
          infrastructureFeeReferralDiscount
          infrastructureFeeVolumeDiscount
          liquidityFeeReferralDiscount
          liquidityFeeVolumeDiscount
        }
        sellerFee{
          makerFee
          infrastructureFee
          liquidityFee
          buyBackFee
          treasuryFee
          highVolumeMakerFee
          makerFeeReferralDiscount
          makerFeeVolumeDiscount
          infrastructureFeeReferralDiscount
          infrastructureFeeVolumeDiscount
          liquidityFeeReferralDiscount
          liquidityFeeVolumeDiscount
        }
        
      }
    }
  }
}

Rest response - high volume maker fee :

"node": {
          "id": "34ce4da0fc65ee063dc384be643bc932714eafb20b6c97b8ef92741de5fce5fb",
          "marketId": "90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e",
          "price": "237520",
          "size": "100",
          "buyer": "00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571",
          "seller": "7a3832b7190fb834f49bead42e796acc2f2e4c8f4631c4b4fcf14ccebd7c789f",
          "aggressor": "SIDE_SELL",
          "buyOrder": "4fb91838912c6e15316d486f53d17c690246c2c9a75338837fc5c4ba92dd4013",
          "sellOrder": "6c5936aa2800fa50dd7305d9cd1f6cbca9aeafa2cfdad91ee71e7a276e8ef483",
          "timestamp": "1726588214168565000",
          "type": "TYPE_DEFAULT",
          "buyerFee": {
            "makerFee": "0",
            "infrastructureFee": "0",
            "liquidityFee": "0",
            "makerFeeVolumeDiscount": "0",
            "infrastructureFeeVolumeDiscount": "0",
            "liquidityFeeVolumeDiscount": "0",
            "makerFeeReferrerDiscount": "0",
            "infrastructureFeeReferrerDiscount": "0",
            "liquidityFeeReferrerDiscount": "0",
            "treasuryFee": "0",
            "buyBackFee": "0",
            "highVolumeMakerFee": "0"
          },
          "sellerFee": {
            "makerFee": "46032",
            "infrastructureFee": "115079",
            "liquidityFee": "2303",
            "makerFeeVolumeDiscount": "1472",
            "infrastructureFeeVolumeDiscount": "3681",
            "liquidityFeeVolumeDiscount": "73",
            "makerFeeReferrerDiscount": "0",
            "infrastructureFeeReferrerDiscount": "0",
            "liquidityFeeReferrerDiscount": "0",
            "treasuryFee": "0",
            "buyBackFee": "0",
            "highVolumeMakerFee": "95008"
          },
          "buyerAuctionBatch": "0",
          "sellerAuctionBatch": "0",
          "assetPrice": ""
        },

GraphQL for the exact same trade - no maker fee 👎

"node": {
            "id": "34ce4da0fc65ee063dc384be643bc932714eafb20b6c97b8ef92741de5fce5fb",
            "market": {
              "id": "90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e"
            },
            "buyOrder": "4fb91838912c6e15316d486f53d17c690246c2c9a75338837fc5c4ba92dd4013",
            "sellOrder": "6c5936aa2800fa50dd7305d9cd1f6cbca9aeafa2cfdad91ee71e7a276e8ef483",
            "buyer": {
              "id": "00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571"
            },
            "seller": {
              "id": "7a3832b7190fb834f49bead42e796acc2f2e4c8f4631c4b4fcf14ccebd7c789f"
            },
            "aggressor": "SIDE_SELL",
            "price": "237520",
            "size": "100",
            "createdAt": "2024-09-17T15:50:14.168565Z",
            "type": "TYPE_DEFAULT",
            "buyerFee": {
              "makerFee": "0",
              "infrastructureFee": "0",
              "liquidityFee": "0",
              "buyBackFee": "0",
              "treasuryFee": "0",
              "highVolumeMakerFee": "",
              "makerFeeReferralDiscount": "0",
              "makerFeeVolumeDiscount": "0",
              "infrastructureFeeReferralDiscount": "0",
              "infrastructureFeeVolumeDiscount": "0",
              "liquidityFeeReferralDiscount": "0",
              "liquidityFeeVolumeDiscount": "0"
            },
            "sellerFee": {
              "makerFee": "46032",
              "infrastructureFee": "115079",
              "liquidityFee": "2303",
              "buyBackFee": "0",
              "treasuryFee": "0",
              "highVolumeMakerFee": "",
              "makerFeeReferralDiscount": "0",
              "makerFeeVolumeDiscount": "1472",
              "infrastructureFeeReferralDiscount": "0",
              "infrastructureFeeVolumeDiscount": "3681",
              "liquidityFeeReferralDiscount": "0",
              "liquidityFeeVolumeDiscount": "73"
            }
          }

@JonRay15
Copy link
Author

Confirmed .... we have a high volume maker fee ...

{
          "node": {
            "id": "34ce4da0fc65ee063dc384be643bc932714eafb20b6c97b8ef92741de5fce5fb",
            "market": {
              "id": "90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e"
            },
            "buyOrder": "4fb91838912c6e15316d486f53d17c690246c2c9a75338837fc5c4ba92dd4013",
            "sellOrder": "6c5936aa2800fa50dd7305d9cd1f6cbca9aeafa2cfdad91ee71e7a276e8ef483",
            "buyer": {
              "id": "00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571"
            },
            "seller": {
              "id": "7a3832b7190fb834f49bead42e796acc2f2e4c8f4631c4b4fcf14ccebd7c789f"
            },
            "aggressor": "SIDE_SELL",
            "price": "237520",
            "size": "100",
            "createdAt": "2024-09-17T15:50:14.168565Z",
            "type": "TYPE_DEFAULT",
            "buyerFee": {
              "makerFee": "0",
              "infrastructureFee": "0",
              "liquidityFee": "0",
              "buyBackFee": "0",
              "treasuryFee": "0",
              "highVolumeMakerFee": "0",
              "makerFeeReferralDiscount": "0",
              "makerFeeVolumeDiscount": "0",
              "infrastructureFeeReferralDiscount": "0",
              "infrastructureFeeVolumeDiscount": "0",
              "liquidityFeeReferralDiscount": "0",
              "liquidityFeeVolumeDiscount": "0"
            },
            "sellerFee": {
              "makerFee": "46032",
              "infrastructureFee": "115079",
              "liquidityFee": "2303",
              "buyBackFee": "0",
              "treasuryFee": "0",
              "highVolumeMakerFee": "95008",
              "makerFeeReferralDiscount": "0",
              "makerFeeVolumeDiscount": "1472",
              "infrastructureFeeReferralDiscount": "0",
              "infrastructureFeeVolumeDiscount": "3681",
              "liquidityFeeReferralDiscount": "0",
              "liquidityFeeVolumeDiscount": "73"
            }
          }
        }
      ]
    }
  }
}

@JonRay15 JonRay15 removed the fe-request A list of reasonably high value API change requests from front end label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Merged
3 participants