Jump to
Ctrl
+
/

Prepare Transaction From Address

POST
/blockchain-data/{blockchain}/{network}/transactions/prepare-from-address

Through this endpoint customers can prepare a transaction from an address with private and public keys. The address doesn’t have to belong to a wallet. The response will include the transaction fee in Wei.

Path Parameters

blockchain string Required

Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

network string Required

Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while network like "testnet" is a test network.

Query Parameters

context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

Request Body Schema application/json

context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

data object Required
item object Required
additionalData string Optional

Represents an optional note to add a free text in, explaining or providing additional detail on the transaction request.

amount string Required

Representation of the transacted amount

nonce string Optional

Represents the sequential running number for an address, starting from 0 for the first transaction. E.g., if the nonce of a transaction is 10, it would be the 11th transaction sent from the sender's address.

recipient string Required

The address which receives this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one recipient.

sender string Required

Represents the address which sends this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one sender.

fee object Required

Defines the amount of the transaction fee.

exactAmount string Optional

String representation of the exact amount

priority string Required

Enum representation of the fee priority

substractFromAmount boolean Optional

Representation of the subtract from amount whether it is "true", or "false".

transactionType string Optional

Representation of the transaction type. For Ethereum-Classic and Binance Smart Chain there is no need to provide "transactionType" in the request.

Response Schema

apiVersion string Required

Specifies the version of the API that incorporates this endpoint.

2023-04-25
requestId string Required

Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

601c1710034ed6d407996b30
context string Optional

In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. context is specified by the user.

yourExampleString
data object Required
item object Required
amount string Required

Representation of the transacted amount

2000000009340
dataHex string Optional

Representation of the data in hex value

0x006e0065006b006100760073007400720069006e0067
nonce string Optional

Represents the sequential running number for an address, starting from 0 for the first transaction. E.g., if the nonce of a transaction is 10, it would be the 11th transaction sent from the sender's address.

0
recipient string Required

The address which receives this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one recipient.

0x041c594a0cc194e826bef5411b29c7f27001b7e3
sender string Required

Represents the address which sends this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one sender.

0x03654A9E78771442CAdf8DB37ae60D6a12bAEa9f
sighash string Required

Representation of the hash that should be signed

9f59f25bc9f6cbff293ceee32c1fb25ae82fab23a99b860e26cad800ceadd123
blockchainSpecific object Required
fee object Required

Defines the amount of the transaction fee.

gasLimit string Required

Represents the amount of gas used by this specific transaction alone.

21220
gasPrice string Required

Represents the price offered to the miner to purchase this amount of gas.

47125353
transactionType string Required

Representation of the transaction type

legacy-transaction
unit string Required

Represents the unit of the amount transacted

BNB

Credits Cost : 2500 Credits for 1 Results

Was this page helpful?
Yes
No
Powered by
Language
URL

{
    "apiVersion": "2023-04-25",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "amount": "2000000009340",
            "dataHex": "0x006e0065006b006100760073007400720069006e0067",
            "nonce": "0",
            "recipient": "0x041c594a0cc194e826bef5411b29c7f27001b7e3",
            "sender": "0x03654A9E78771442CAdf8DB37ae60D6a12bAEa9f",
            "sighash": "9f59f25bc9f6cbff293ceee32c1fb25ae82fab23a99b860e26cad800ceadd123",
            "blockchainSpecific": {
                "fee": {
                    "gasLimit": "21220",
                    "gasPrice": "47125353"
                },
                "transactionType": "legacy-transaction",
                "unit": "BNB"
            }
        }
    }
}