🔑
New Bitcoin City Developers
  • Keys API
    • Get Top Key Holders
    • Search Key Holders
    • Track New Key Holders
    • Get Trade History Data
    • Get Trade History by Address
    • Get Chart Key by Address
    • Get Chart Token by Address
    • Get List Token Balance by Address
    • Get User Profile
    • Get Tweet Like Retweet
    • Get Number Tweet Post Comment
    • Get List Bull Bear (Mr Market)
    • Get Bull Bear Detail
    • Get List Raffle
    • Get Raffle Detail
    • Get List Spin Wheel
    • Get Spin Wheel Detail
  • Keys Contract Interaction
    • Get Keys Holding by User
    • Get Buying Price
    • Get Selling Price
    • Buy Key
    • Sell Key
    • Estimate Swap Key
    • Execute Swap Key
    • Multicall
    • Staking Open
    • Staking Close
    • Staking Order Create
    • Staking Order Close
  • PlaceHolder Chrome Extension
  • Prompts
  • Demo site
    • Demo
Powered by GitBook
On this page
  • Contract function
  • Contract address
  • Parameters
  • Sample code
  1. Keys Contract Interaction

Get Buying Price

Get the buying price of a certain key in BTC.

Contract function

getBuyPriceAfterFeeV2

Contract address

Key contract address

Parameters

amountX18: amount of key buy

Sample code

 const { data: buyPrice }: { data: BigInt | undefined } = useContractRead({
    address: user.tokenaddress as `0x${string}`,
    abi: TOKEN_ABI,
    functionName: "getBuyPriceAfterFeeV2",
    args: [buy*1e18/10],
  });

PreviousGet Keys Holding by UserNextGet Selling Price

Last updated 1 year ago