Send Your First Transfer

After creating a Wallet Create Wallet , the system will receive and process your transfers and balance changes in the wallet accordingly.

Watch wallet transfers

You can now use the Krayon Digital API to make a request to retrieve all the transfers made in your wallet.

The API request example below will return for you details of transfers made in your wallet.
You can create an API request using any of your favorite programming languages.

Request:

import axios from 'axios';

const options = {
  method: 'GET',
  url: 'https:/api.aqua.test.krayondigital.com/main/api/v1/wallets/{WALLET_ID}/transfers',
  headers: {
    'accept': 'application/json',
    'content-type': 'application/json',
    'Authorization': 'Bearer YOUR-API-TOKEN'
  },
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
import requests

url = "https:/api.aqua.test.krayondigital.com/main/api/v1/wallets/{WALLET_ID}/transfers"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
 		"Authorization": "Bearer YOUR-API-TOKEN"
}

response = requests.get(url, headers=headers)
print(response.text)

Response:

{
  "count": 122,
  "next": "https://api.aqua.test.krayondigital.com/main/api/v1/wallets/{WALLET_ID}/transactions?page=2",
  "previous": null,
  "data": [
    {
      "id": "bbf0433356ab4c1396f03864079e0bfa",
      "nonce": 2,
      "gas_price": 96565036,
      "gas_limit": 0,
      "from_address": "0x259143f532ddb80992219aa83c9ae9f68dc4ef28",
      "to_address": "0x5dcf1decb10c6e7dfaeba2e87da1bdf9473629e1",
      "hash": "0xab30e768f956fd9b7125ef2b8d2a67f9bcdaa3e31860dd714064e40b2ec12cf2",
      "value": "0.005000000000000000",
      "native_price": "1572.519876190704280816",
      "token_price": "0.000000000000000000",
      "coin": "ETH",
      "type": 0,
      "chain_id": 5,
      "status": 1,
      "contract_address": "",
      "transaction": "d27fd9cd177d48b4b535c57d87afc311",
      "block_time_stamp": "2022-09-27T11:35:24Z",
      "wallet": "bfbb414070e149648c60e7dd811072b7",
      "tags": ["first-transaction", "krayon"],
      "notes": "Yet this is another transfer",
      "logo_uri": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png"
    },
      ...
  ]
}

To send funds from the wallet, you first need to buy crypto with Fiat or transfer it from another wallet.
It is recommended to use Krayon Digital on-ramp integration - TBD.

If you are on a Test Net eg; goerli you can transfer funds to your wallet using one of the following faucets:

  1. https://goerlifaucet.com/
  2. https://faucet.paradigm.xyz/
  3. Using PoW - https://goerli-faucet.pk910.de/

You can track the transactions on etherscan goerli network

Watch the balance

The following API request example will get the wallet balance.
You can create an API request using any of your favorite programming languages.

Request:

import axios from 'axios';

const options = {
  method: 'GET',
  url: 'https:/api.aqua.test.krayondigital.com/main/api/v1/wallets/{WALLET_ID}/balance',
  headers: {
    'accept': 'application/json',
    'content-type': 'application/json',
    'Authorization': 'Bearer YOUR-API-TOKEN'
  },
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
import requests

url = "https:/api.aqua.test.krayondigital.com/main/api/v1/wallets/{WALLET_ID}/balance"

headers = {
    "accept": "application/json",
    "content-type": "application/json",
 		"Authorization": "Bearer YOUR-API-TOKEN"
}

response = requests.get(url, headers=headers)
print(response.text)

Response:

{
    "count": 1,
    "next": null,
    "previous": null,
    "data": [
        {
            "id": "450bf5b367344a26b8ad326fc047ec46",
            "wallet": "274a71f9a905405ba2c5b1c746707ba1",
            "coin": "WETH",
            "available_usd_balance": "746.000000000000000000",
            "total_usd_balance": "746.000000000000000000",
            "available_balance": "0.100000000000000000",
            "total_balance": "0.100000000000000000",
            "decimals": 18,
            "logo": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png"
        }
    ],
    "total_balance": 0.114984691606165,
    "available_balance": 0.114984691606165,
    "total_usd_balance": 901.7085245087138,
    "available_usd_balance": 901.7085245087138
}

Send transfer

The following API request will send a transfer from one wallet to another wallet.
You can create an API request using any of your favorite programming languages.

Request:

import axios from 'axios';

const options = {
  method: 'POST',
  url: 'https:/api.aqua.test.krayondigital.com/main/api/v1/transactions',
  headers: {
    'accept': 'application/json',
    'content-type': 'application/json',
    'Authorization': 'Bearer YOUR-API-TOKEN'
  },
  data: {
    "to_address": "0x119F1497F8b4B1981E97348638bafF6F0F4695bF",
    "value": 0.1,
    "gas_limit": 1048576,
    "wallet": "274a71f9a905405ba2c5b1c746707ba1",
    "coin": "ETH",
    "tags": ["new", "transaction"],
    "notes":"This is my first transaction with Krayon Digital platform"
	}
};

axios
  .request(options)
  .then(function (response) {
    console.log(response.data);
  })
  .catch(function (error) {
    console.error(error);
  });
import requests

url = "https:/api.aqua.test.krayondigital.com/main/api/v1/transactions"

payload = {
    "to_address": "0x119F1497F8b4B1981E97348638bafF6F0F4695bF",
    "value": 0.1,
    "gas_limit": 1048576,
    "wallet": "274a71f9a905405ba2c5b1c746707ba1",
    "coin": "ETH",
    "tags": ["new", "transaction"],
    "notes":"This is my first transaction with Krayon Digital"
}

headers = {
    "accept": "application/json",
    "content-type": "application/json",
 		"Authorization": "Bearer YOUR-API-TOKEN"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)

Response:

{
    "data": {
        "id": "21eaa7ef470a4f7c93fd050384bea89f",
        "from_address": "0x5DCf1DeCB10C6E7DFaEBa2E87da1bDf9473629e1",
        "to_address": "0x119F1497F8b4B1981E97348638bafF6F0F4695bF",
        "value": 0.001,
        "gas_limit": 21000,
        "wallet": "274a71f9a905405ba2c5b1c746707ba1",
        "coin": "ETH",
        "tags": [
            "new",
            "transaction"
        ],
        "notes":"This is my first transaction with Krayon Digital platform",
        "type": null,
        "nonce": 96,
        "data": "0x",
        "chain_id": 5,
        "gas_price": 1455,
        "v": 46,
        "r": "0xe074a6f258fadd3c887582db7d3da6fa97d353cef5227234f86ff2e51b2cb9a8",
        "s": "0x30831b1d0dc074629e5f2bb4d2d026e69e123ffad6aa05e57fc5d71f9e361667",
        "confirmations": 0,
        "hash": "0x541a7027a0ff63de4c0722da9d859344d90be6f26e8230b8cc8e37f5d70af7cf"
    }
}