How to sell BetVerse Token in API

This session show how to sell BetVerse tokens through this API.

POST
https://{providerApiEndpoint}/api/v1/token/sell


REQUEST HEADERS

HeaderValue
Content-Typeapplication/json
api_keyapi_value

REQUEST BODY

FieldTypeDescription
userAddressStringThe address from exchange wallet, this address must have founds (TOKEN) to send tokens to destinatary.
destinataryStringThe customer address that will receive USD.
amountStringThe amount in TOKENS that customer desire transform in tokens.
usdAddressStringThe address of stable coin that you wish use to make the trade (DAI, USDT, USDC)

REQUEST EXAMPLES

{
    "userAddress": "0x2dfFF737EB054DED9795d96d6d9B9909896BB940",
    "destinatary": "0x2d8CB20c42D9E60Dc40e4e336a2cE7A97128a0aB",    
    "amount": "100",
    "usdAddress": "0xcb1e72786a6eb3b44c2a2429e317c8a2462cfeb1",
}
curl --location --request POST 'https://{providerApiEndpoint}/api/v1/token/sell' \
--header 'api_key: api_value' \
--header 'Content-Type: application/json' \
--data-raw '{
    "userAddress": "0x2dfFF737EB054DED9795d96d6d9B9909896BB940",
    "destinatary": "0x2dfFF737EB054DED9795d96d6d9B9909896BB940",
    "amount": "100",
    "usdAddress": "0xcb1e72786a6eb3b44c2a2429e317c8a2462cfeb1",
}'

RESPONSE BODY

{
    "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
    "blockNumber": 28090971,
    "contractAddress": null,
    "cumulativeGasUsed": 4221195,
    "effectiveGasPrice": 2500000010,
    "from": "0x2dfff737eb054ded9795d96d6d9b9909896bb940",
    "gasUsed": 80541,
    "logsBloom": "0x40001000000000000000000000000000000000000000000000000000020000000000000000000002000000000000000000008400000000000020000000200000000000000000001000000008000000800000000000000000000100000000104010000000008000000000008000000000004000000000000080080010000000000000000000000000000000000010000000000000020080000000000000000000220000000000000000000000000000000000000000000000000000000000004000000002000000000001000004000000000000000000000000100040000000000010000000008000000000000000080000000000002000000000000000900000",
    "status": true,
    "to": "0xccd3fea2b9d55f08710cc81489bccce6084358ea",
    "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
    "transactionIndex": 18,
    "type": "0x2",
    "events": {
        "0": {
            "address": "0x6476846bb6138676c2FF4f78dFCB580a9B31DbDe",
            "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
            "blockNumber": 28090971,
            "logIndex": 122,
            "removed": false,
            "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
            "transactionIndex": 18,
            "id": "log_efd8cae6",
            "returnValues": {},
            "signature": null,
            "raw": {
                "data": "0x000000000000000000000000000000000000000000084592eaf7753622600000",
                "topics": [
                    "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
                    "0x0000000000000000000000002dfff737eb054ded9795d96d6d9b9909896bb940",
                    "0x000000000000000000000000ccd3fea2b9d55f08710cc81489bccce6084358ea"
                ]
            }
        },
        "1": {
            "address": "0x6476846bb6138676c2FF4f78dFCB580a9B31DbDe",
            "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
            "blockNumber": 28090971,
            "logIndex": 123,
            "removed": false,
            "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
            "transactionIndex": 18,
            "id": "log_5315f15e",
            "returnValues": {},
            "signature": null,
            "raw": {
                "data": "0x0000000000000000000000000000000000000000000000008ac7230489e80000",
                "topics": [
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x0000000000000000000000002dfff737eb054ded9795d96d6d9b9909896bb940",
                    "0x000000000000000000000000ccd3fea2b9d55f08710cc81489bccce6084358ea"
                ]
            }
        },
        "2": {
            "address": "0xcB1e72786A6eb3b44C2a2429e317c8a2462CFeb1",
            "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
            "blockNumber": 28090971,
            "logIndex": 124,
            "removed": false,
            "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
            "transactionIndex": 18,
            "id": "log_cc249602",
            "returnValues": {},
            "signature": null,
            "raw": {
                "data": "0x0000000000000000000000000000000000000000000000000d9e59573afc8000",
                "topics": [
                    "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
                    "0x000000000000000000000000ccd3fea2b9d55f08710cc81489bccce6084358ea",
                    "0x0000000000000000000000002d8cb20c42d9e60dc40e4e336a2ce7a97128a0ab"
                ]
            }
        },
        "3": {
            "address": "0xcCd3feA2b9D55F08710cc81489BCccE6084358ea",
            "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
            "blockNumber": 28090971,
            "logIndex": 125,
            "removed": false,
            "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
            "transactionIndex": 18,
            "id": "log_c36de194",
            "returnValues": {},
            "signature": null,
            "raw": {
                "data": "0x0000000000000000000000000000000000000000000000000d9e59573afc8000000000000000000000000000000000000000000000000000015ca288b9194000000000000000000000000000cb1e72786a6eb3b44c2a2429e317c8a2462cfeb1",
                "topics": [
                    "0x8b187bdbc153aab67fd5321987dc59edf761e9d36852a4b983d889bea9c2e942",
                    "0x0000000000000000000000002d8cb20c42d9e60dc40e4e336a2ce7a97128a0ab"
                ]
            }
        },
        "4": {
            "address": "0x0000000000000000000000000000000000001010",
            "blockHash": "0xdfff6f6afcf01c8b25739589c8a27dda11c8340f75f559fe217fbe9370ea0d33",
            "blockNumber": 28090971,
            "logIndex": 126,
            "removed": false,
            "transactionHash": "0xce1d4dc6178802b7521b4d96c5ed900fe4d70e2c985662ac94a26651ce8239c8",
            "transactionIndex": 18,
            "id": "log_46b06cf8",
            "returnValues": {},
            "signature": null,
            "raw": {
                "data": "0x0000000000000000000000000000000000000000000000000000b721083cb500000000000000000000000000000000000000000000000031dd330dd219f38078000000000000000000000000000000000000000000002552a4066c843b17b7cf000000000000000000000000000000000000000000000031dd3256b111b6cb78000000000000000000000000000000000000000000002552a40723a543546ccf",
                "topics": [
                    "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63",
                    "0x0000000000000000000000000000000000000000000000000000000000001010",
                    "0x0000000000000000000000002dfff737eb054ded9795d96d6d9b9909896bb940",
                    "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f"
                ]
            }
        }
    }
}