This API specification is old and only here for reference, please refer to the latest stable version for production use.

Kiln API Docs (1.0.0)

Download OpenAPI specification:Download

This API provides reporting staking data on various protocols as well as network wide data, staking transaction crafting features and so on.

ACCESS

In order to use the Kiln API, you must first get an API token from your Kiln dashboard (applications section). If you don't have access to our dashboard, please get in touch at hello@kiln.fi.

Once you have your API token, you can set it as a bearer token in your HTTP request headers, and target the Kiln API endpoint with the current MAJOR version of the API as a prefix to routes:

curl "https://api.kiln.fi/v1/..." -H "Authorization: Bearer $KILN_API_TOKEN"
If you need a development environment, please reach out to hello@kiln.fi to have a specific access to our testnet environment and dedicated API endpoint.

CHANGELOG

Version 1.0.0 (2023-01-01)
  • ETH: Initial support of /v1/eth/stakes endpoint
  • ETH: Initial support of /v1/eth/rewards endpoint
  • ETH: Initial support of /v1/eth/network-stats endpoint
  • ETH: Initial support of /v1/eth/keys endpoint

VERSIONING

Versions of the Kiln API use MAJOR.MINOR.PATCH where:

  • MAJOR version is increased when there is major incompatible API changes, major versions will be communicated in advance to all customers with a smooth transition path that spans over a minimum period of 3 MINOR versions or ~3 months. Intended frequency: 1 year.
  • MINOR version is increased for backward compatible API changes without notice, or communicated breaking changes with a 1 minor version notice and a smooth migration path. Minor versions will be communicated regularly to customers with the changelog. Intended frequency: 1 month.
  • PATCH version is increased for backward compatible hot-fixes, patch versions will be communicated to affected customers.
Due to the nature of blockchains (protocol disappearing, breaking protocol upgrades), Kiln may introduce backward-incompatible changes in MINOR versions after following a 1 MINOR version deprecation path (~1 month). These impacting changes will be narrowed as much as possible to the protocol, heavily communicated with clear guidelines and support. Customer not relying on affected protocols will not be affected.

BACKWARD COMPATIBILITY

Kiln considers the following changes to be backward compatible:

  • Adding new API routes.
  • Adding new optional request parameters to existing API methods.
  • Adding new properties to existing API responses.
  • Changing the order of properties in existing API responses.
  • Adding new event types in existing enums.

Non-breaking changes may be introduced in our API and subject to modification before being officialy communicated and documented here. Your application should not depend on them until part of this specification. The preview Kiln API specifications with upcoming and experimental new features can be found here.

ETH

Staking facilities for the Ethereum protocol

Stakes

Get the status of Ethereum stakes

Authorizations:
bearerAuth
query Parameters
validators
Array of strings
Example: validators=0x95373bcf8e2c64e1c373a6e534c002f210adbcc84c5abda3b6306677e171430ae50781a51c9f579a47622e334dba2412

Comma-separated list of validators addresses

wallets
Array of strings
Example: wallets=0xe1f4acc0affB36a805474e3b6ab786738C6900A2

Comma-separated list of wallets addresses

accounts
Array of strings <uuid> [ items <uuid > ]
Example: accounts=b7177fd2-fbb3-479f-aa92-db9fb16e229f

Comma-separated list of Kiln accounts identifiers

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "data": [
    • {
      • "validator_address": "0x95373bcf8e2c64e1c373a6e534c002f210adbcc84c5abda3b6306677e171430ae50781a51c9f579a47622e334dba2412",
      • "state": "active_ongoing",
      • "activated_at": "2023-01-14T01:13:59Z",
      • "activated_epoch": 174049,
      • "delegated_block": 16397387,
      • "deposit_tx_sender": "0xe1f4acc0affB36a805474e3b6ab786738C6900A2",
      • "execution_fee_recipient": "0xe1f4acc0affB36a805474e3b6ab786738C6900A2",
      • "withdrawal_credentials": "010000000000000000000000e1f4acc0affb36a805474e3b6ab786738c6900a2",
      • "effective_balance": "32000000000000000000",
      • "balance": "32076187808000000000",
      • "consensus_rewards": "76187808000000000",
      • "execution_rewards": "0",
      • "rewards": "76187808000000000",
      • "gross_apy": 3.407,
      • "updated_at": "2023-01-14T01:13:59Z"
      }
    ]
}

Rewards

Get historical rewards by day of Ethereum stakes

Authorizations:
bearerAuth
query Parameters
validators
Array of strings
Example: validators=0x95373bcf8e2c64e1c373a6e534c002f210adbcc84c5abda3b6306677e171430ae50781a51c9f579a47622e334dba2412

Comma-separated list of validators addresses

wallets
Array of strings
Example: wallets=0xe1f4acc0affB36a805474e3b6ab786738C6900A2

Comma-separated list of wallets addresses

accounts
Array of strings <uuid> [ items <uuid > ]
Example: accounts=b7177fd2-fbb3-479f-aa92-db9fb16e229f

Comma-separated list of Kiln accounts identifiers

start_date
string <date>
Example: start_date=2023-01-10
test-disabled: true

Get rewards from this date (YYYY-MM-DD)

end_date
string <date>
Example: end_date=2023-01-20
test-disabled: true

Get rewards to this date (YYYY-MM-DD)

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "data": [
    • {
      • "date": "2023-01-15",
      • "consensus_rewards": "2988504000000000",
      • "execution_rewards": "0",
      • "rewards": "2988504000000000",
      • "stake_balance": "64000000000000000000",
      • "gross_apy": 3.407,
      • "cl_apy": 3.407,
      • "el_apy": 0
      }
    ]
}

Network Stats

Get some network statistics on Ethereum staking

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json; charset=utf-8
{
  • "data": {
    • "network_gross_apy": 4.5,
    • "supply_staked_percent": 12.4
    }
}

Validation Keys

Create Ethereum validation keys on Kiln's infrastructure.

Authorizations:
bearerAuth
Request Body schema: application/json; charset=utf-8
required

Ethereum keys to generate

account_id
required
string <uuid>

Kiln Account ID to stake into

withdrawal_address
required
string

Ethereum withdrawal address used for the withdrawals credentials of the validators. BLS format is not supported.

number
required
number [ 1 .. 150 ]

Number of validator keys to generate. You can generate up to 150 keys at once.

format
string
Default: "batch_deposit"
extensible-enum: ["cli_deposit","batch_deposit"]

Response format. Use "cli_deposit" for more information about each key.

Responses

Request samples

Content type
application/json; charset=utf-8
{
  • "account_id": "b7177fd2-fbb3-479f-aa92-db9fb16e229f",
  • "withdrawal_address": "0xe1f4acc0affB36a805474e3b6ab786738C6900A2",
  • "number": 1,
  • "format": "cli_deposit"
}

Response samples

Content type
application/json; charset=utf-8
{
  • "data": [
    • {
      • "format": "cli_deposit",
      • "pubkey": "8f36e2f4e921b1ed5ce9c94f21e1f26a748ac4e0c57f0d8973e7d576a2f8953b87dd86300de718238de23b1fecb19db5",
      • "withdrawal_credentials": "010000000000000000000000e1f4acc0affb36a805474e3b6ab786738c6900a2",
      • "amount": 32000000000,
      • "signature": "b7947eabf631d4772c4014a9fec2ecac2c15fc5175ad83023bbdfc9e6618cb8e78829231477c060bc9339482058ff195141f2aeb801c0329a1a4afebd7e76ce0ba1d9d88f8820d052836a79d59aea673db9eb5009db4a4f6e04fb7ffbdbdd604",
      • "deposit_message_root": "65db6ae73c6465311a7acf2cd8a2863eececf09901872550639f0d8f6c1876f5",
      • "deposit_data_root": "9b74cccf3a3c501374179be4bb6f505c4b40da41c205a101db3342a8df0af2dd",
      • "fork_version": "00000000",
      • "network_name": "mainnet",
      • "deposit_cli_version": "2.2.0"
      }
    ]
}