Create Coins Transaction Request from Wallet

Through this endpoint users can create a new transaction request from the entire Wallet instead from just a specific address. This endpoint can generate transactions from multiple to multiple addresses.

This is available only for UTXO-based protocols such as Bitcoin, Bitcoin Cash, Litecoin, etc. It is not available for Account-based protocols like Ethereum.

POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transaction-requests

Path Parameters

  • Required
    blockchain string

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

    Example : bitcoin
    Possible Values : bitcoin bitcoin-cash litecoin dogecoin dash
  • Required
    network string

    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 networks like "testnet", "ropsten", "rinkeby" are test networks.

    Example : testnet
    Possible Values : mainnet testnet
  • Required
    walletId string

    Represents the sender's specific and unique Wallet ID of the sender.

    Example : 609e221675d04500068718dc

Query parameters

  • Optional
    context string

    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

  • Optional
    context string

    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.

  • Required
    data object
    • Required
      item object
      • Required
        destinations array
        Items (object)

        Defines the destination of the transaction, whether it is incoming or outgoing.

        • Optional
          address string

          Defines the specific destination address.

          Example : 0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5
        • Optional
          amount string

          Represents the specific amount of the transaction's destination.

          Example : 0.125
      • Required
        feePriority string

        Represents the fee priority of the automation, whether it is "slow", "standard" or "fast".

        Example : standard
        Possible Values : slow standard fast

Response schema

200 400 401 402 403 409 415 422 429 500
HTTP Status Code: 200
Content-Type: application/json

The request has been successful.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2.0
  • Required
    requestId string

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

    Example : 601c1710034ed6d407996b30
  • Optional
    context string

    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.

    Example : You can add any text here
  • Required
    data object
    • Required
      item object
      • Required
        feePriority string

        Represents the fee priority of the automation, whether it is "slow", "standard" or "fast".

        Example : standard
        Possible Values : slow standard fast
      • Required
        recipients array

        Defines the destination of the transaction, whether it is incoming or outgoing.

        • Required
          address string

          Defines the specific destination address.

          Example : mmd963W1fECjLyaDCHcioSCZYHkRwjkhtr
        • Required
          amount string

          Represents the specific amount of the transaction's destination.

          Example : 0.00123
      • Required
        totalTransactionAmount string

        Represents the specific amount of the transaction.

        Example : 0.001
      • Required
        transactionRequestStatus string

        Defines the status of the transaction, e.g. "created, "await_approval", "pending", "prepared", "signed", "broadcasted", "success", "failed", "rejected", mined".

        Example : created
        Possible Values : created await-approval pending prepared signed broadcasted success failed rejected mined
Try it out

Request Example

POST
https://rest.cryptoapis.io/v2/wallet-as-a-service/wallets/609e221675d04500068718dc/bitcoin/testnet/transaction-requests
Headers
Host: https://rest.cryptoapis.io/v2
Content-Type: application/json
X-API-Key: my-api-key

Request Body
{
    "context": "",
    "data": {
        "item": {
            "destinations": [
                {
                    "address": "0x6f61e3c2fbb8c8be698bd0907ba6c04b62800fe5",
                    "amount": "0.125"
                }
            ],
            "feePriority": "standard"
        }
    }
}

Response Example

{
    "apiVersion": "2.0",
    "requestId": "601c1710034ed6d407996b30",
    "context": "You can add any text here",
    "data": {
        "item": {
            "feePriority": "standard",
            "recipients": [
                {
                    "address": "mmd963W1fECjLyaDCHcioSCZYHkRwjkhtr",
                    "amount": "0.00123"
                }
            ],
            "totalTransactionAmount": "0.001",
            "transactionRequestStatus": "created"
        }
    }
}