Binance Smart Chain
Contract API endpoints
Please refer to the smart contract documentation for Binance Smart Chain for instructions on how to use these API endpoints with their smart contracts.
BSC CONTRACT API
Call API
Method name | Param | Return | Description | Trade related |
| - | uint256 | get the curent pool state | Yes |
| - | uint256 | get max amount per transaction | Yes |
| - | uint256 | get min amount per transaction | Yes |
| uint256 | uint256 | Returns the amount of trading token to receive | Yes |
| uint256 | uint256 | Returns the amount of base token to receive | Yes |
| - | uint256 | Return amount of UP token the user can claim | No |
| - | uint256 | %Max amount per trade | Yes |
| - | uint256 | If the pair is open for trading:[0 - close , 1 - open] | Yes |
| - | uint256 | Rebates %[Out of 100000] | Yes |
| - | uint256 | %FEE for the pair[Out of 100000] | Yes |
| - | uint256 | Return Total Supply of liquidity token | No |
| address | uint256 | Return user liquidity balance | No |
| - | string | Return Liquidity name Symbol | No |
| - | string | Return Liquidity Token Symbol | No |
| - | uint28 | Return Liquidity Token Decimals | No |
Send API
Method name | Param | Return | Payable | Description | |
| address | uint256 | Yes | When a user buys a trading token.Example UP/BNB, a user would like to BUY UP using 1 BNB param would be user account address, call value would be 1 BNB | |
| uint256 | uint256 | No | When a user sells a trading token.Example UP/BNB, a user would like to SELL 10 UP.The webapp *must( send an approval before executing sell function. Param would be 1e19[Up has 18 decimals we are selling 10 UP] | |
| - | uint256 | Yes | For Liquidity Providers to deposit their tokens approval/allowance must be given before trigerring this function | |
| uint256 | bool | No | False | Liquidity providers to withdraw their liquidity |
| - | uint256 | - | No | Liquidity providers to claim the UP fees earn from the smart contract |
Last updated