Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Etherna Staking API
version: 7.3.0
description: 'Operations tagged Staking across 2 of this provider''s published API definitions: etherna-swarm-openapi.yml, etherna-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
tags:
- name: Staking
paths:
/stake/withdrawable:
get:
summary: Get the withdrawable staked amount
description: This endpoint fetches any amount that is possible to withdraw as surplus.
tags:
- Staking
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/GetWithdrawableResponse
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: getStakeWithdrawable
x-operation-id-source: derived
delete:
summary: Withdraw the extra withdrawable staked amount
description: This endpoint withdraws any amount that is possible to withdraw as surplus.
tags:
- Staking
parameters:
- $ref: SwarmCommon.yaml#/components/parameters/GasPriceParameter
- $ref: SwarmCommon.yaml#/components/parameters/GasLimitParameter
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/StakeTransactionResponse
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: deleteStakeWithdrawable
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
/stake/{amount}:
post:
summary: Deposit some amount for staking
description: Be aware, this endpoint creates an on-chain transactions and transfers BZZ from the node's Ethereum account and hence directly manipulates the wallet balance.
tags:
- Staking
parameters:
- in: path
name: amount
schema:
type: string
required: true
description: Amount of BZZ added that will be deposited for staking.
- $ref: SwarmCommon.yaml#/components/parameters/GasPriceParameter
- $ref: SwarmCommon.yaml#/components/parameters/GasLimitParameter
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/StakeTransactionResponse
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: postStakeByAmount
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
/stake:
get:
summary: Get the staked amount
description: This endpoint fetches the total staked amount from the blockchain.
tags:
- Staking
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/GetStakeResponse
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: getStake
x-operation-id-source: derived
delete:
summary: Withdraws all past staked amount back to the wallet
description: Be aware, this endpoint can only be called when the contract is paused and is in the process of being migrated to a new contract.
tags:
- Staking
parameters:
- $ref: SwarmCommon.yaml#/components/parameters/GasPriceParameter
- $ref: SwarmCommon.yaml#/components/parameters/GasLimitParameter
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: SwarmCommon.yaml#/components/schemas/StakeTransactionResponse
'400':
$ref: SwarmCommon.yaml#/components/responses/400
'500':
$ref: SwarmCommon.yaml#/components/responses/500
default:
description: Default response
operationId: deleteStake
x-operation-id-source: derived
servers:
- url: http://{apiRoot}:{port}/v1
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
- url: http://{apiRoot}:{port}
variables:
apiRoot:
default: localhost
description: Base address of the local bee node main API
port:
default: '1633'
description: Service port provided in bee node config
externalDocs:
description: Browse the documentation @ the Swarm Docs
url: https://docs.ethswarm.org
x-refined-from:
- etherna-swarm-openapi.yml
- etherna-openapi.yaml