TRAIT DataGate API
  1. Submit new transaction
TRAIT DataGate API
  • Intro
  • History
    • Blocks
      POST
    • Transactions
      POST
    • Events
      POST
  • State
    • Info of on-chain entities
      POST
    • Raw single values of blockchain storage
      POST
    • Raw collections of blockchain storage
      POST
  • Tokens
    • Balances of tokens
      POST
    • Transfers of tokens
      POST
  • Submit new transaction
    • Validate transfer of token TRAIT
      POST
    • Validate transfer of fungible tokens
      POST
    • Validate transfer of nft tokens
      POST
    • Validate clearing transaction of an AppAgent
      POST
    • Build info for new transaction
      POST
    • Submit transaction
      POST
    • Get transaction status
      POST
  1. Submit new transaction

Validate transfer of fungible tokens

POST
https://api.trait.tech/tx/examine/player_transfer/fungible
The endpoint checks whether the player's transfer of fungible token
will be accepted by the blockchain and estimates the blockchain fee.
The endpoint performs all checks using the state of the blockchain for the specified finalised block.
The endpoint doesn't take into account any pending transactions.

Request

Body Params application/json

Example
{
    "transfer": {
        "sender": "ttmLfYytQ5CgTCrwrCZYUXRN6R4sJeDzSxmAqGAgRnhmeBCzB",
        "recipient": "ttnLgcprucb6wZXzugFfrE52QfPfmQdeG9z1Su1jjs5AizBno",
        "fungible_id": 32,
        "amount": 123000000000000
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.trait.tech/tx/examine/player_transfer/fungible' \
--header 'Content-Type: application/json' \
--data-raw '{
    "transfer": {
        "sender": "ttmLfYytQ5CgTCrwrCZYUXRN6R4sJeDzSxmAqGAgRnhmeBCzB",
        "recipient": "ttnLgcprucb6wZXzugFfrE52QfPfmQdeG9z1Su1jjs5AizBno",
        "fungible_id": 32,
        "amount": 123000000000000
    }
}'

Responses

🟢200OK
application/json
Successful Response
Body

Example
{
    "metadata": {
        "request_context": {
            "block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
            "block_index": 29702,
            "block_timestamp": 1727581488000
        },
        "blockchain_head": {
            "block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
            "block_index": 29702,
            "block_timestamp": 1727581488000
        }
    },
    "data": {
        "acceptance": true,
        "rejection_details": null,
        "fee": {
            "tx_fee_mode": "NO_FEE__FREE_TRANSFER"
        }
    }
}
🟠422Parameter Error
Modified at 2024-11-21 18:59:09
Previous
Validate transfer of token TRAIT
Next
Validate transfer of nft tokens
Built with