January 19, 2022, 1:47:15 PM
Buy an asset, by spending another asset you own
The BUY function is used to buy an asset using the balance of another asset held on a labelled address. The BUY function can only be used to buy assets using the balance of another asset on an address in your custody. The BUY function is compatible with hardware wallets only.
BUY (receive_amount: decimal, receive_asset: asset, spend_asset: asset, spend_label: string)
BUY is most commonly used without subfunctions.
This command will prepare a transaction to sign which will buy 800 DAI using the balance of ETH on the labelled address TESTNET1.
If the command submitted to the Command Line has not been formatted correctly, Vektor will open the BUY Function Form to help build and execute the intended command.
Once the amount, the receive asset, the spend asset and the reciever address have been inputted, the Function Form gives a correctly formatted command.
Pressing INSERT pastes the command to the Command Line, ready for execution.
The Signing Request Modal gives you the opportunity to review your transaction details.
In the top right corner, you can check the connection status of your hardware wallet.
Press CONNECT and select a signing device from the list.
When your device is connected, the device connection status will say 'CONNECTED' and the SIGN button will appear.
Click SIGN and follow the instructions on your device.
Once your command has been successfully submitted the notification of the transaction broadcast will appear. Click VIEW to check the confirmation status on the associated public blockchain explorer.