---
title: "Get the private key corresponding to a known address"
method: POST
path: "/wallet/getPrivateKey"
tags: ["wallet"]
---

# Get the private key corresponding to a known address

`POST /wallet/getPrivateKey`

## Request body

- PrivateKeyRequest — Request for getting a secret corresponding to wallet address
  - `address` string, required — Encoded Ergo Address

## Response `200`

Successfully retrieved secret key

- string — Hex-encoded big-endian 256-bits secret exponent

## Other responses

- `404` — Address not found in wallet database
- `default` — Error

## Changes

- **2024-08-12** `f267e9b125ba` — 2 breaking
  - added the new required request property `address`
  - the request's body type/format changed from `string`/`` to `object`/``

[Change history](https://skmtc.dev/ergoplatform/apis/ergo-node-api/changes/wallet/getPrivateKey/post.md)

---

[API](https://skmtc.dev/ergoplatform/apis/ergo-node-api.md) · [All operations](https://skmtc.dev/ergoplatform/apis/ergo-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ergoplatform/ergo-node-api/revisions/f267e9b125ba/schema)
