> For the complete documentation index, see [llms.txt](https://docs.krypcore.com/dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.krypcore.com/dev-docs/api-reference/core-service-apis/wallet-manager/self-managed-wallet/create-wallet.md).

# Create Wallet

This creates a wallet using this method.

## API Specification

## Create Wallet

<mark style="color:green;">`POST`</mark> `http://localhost:8889/wallet/createWallet`

Creates a new wallet under the given instance.&#x20;

#### Request Body

| Name                                        | Type   | Description               |
| ------------------------------------------- | ------ | ------------------------- |
| name<mark style="color:red;">\*</mark>      | String | Name of the wallet        |
| algorithm<mark style="color:red;">\*</mark> | String | Algorithm Name to be used |

{% tabs %}
{% tab title="200: OK SUCCESS" %}

```javascript
{
  "Status": "SUCCESS",
  "Message": "wallet created successfully",
  "Data": {
    "WalletId": "20775f3e-8be1-4e4c-8c80-xxxxxxxxxxx",
    "Address": "0x688c17c7FF9Def682b04699C31Dxxxxxxxxxxxxx"
  }
}
```

{% endtab %}

{% tab title="417: Expectation Failed similar wallet name exist" %}

```javascript
{
    "Status": "FAILURE",
    "Message": "key exist with specified name",
    "Data": null
}
```

{% endtab %}
{% endtabs %}

#### Request Body

| Name                                        | Type   | Description  |
| ------------------------------------------- | ------ | ------------ |
| name<mark style="color:red;">\*</mark>      | String | VW89xy17qNjQ |
| algorithm<mark style="color:red;">\*</mark> | String | G1aoelP8VxPG |

Take a look at how you might call this method using our official libraries, or via `curl`:

{% tabs %}
{% tab title="curl" %}

```bash
curl -X POST http://localhost:8889/wallet/createWallet \
-H "Content-Type: application/json" \
-d '{
    "name": "wallet2",
    "algorithm": "secp256k1"
}'
```

{% endtab %}

{% tab title="Node.js (Fetch)" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "name": "sep",
  "algorithm": "secp256k1"
});

var config = {
  method: 'post',
  url: 'http://localhost:8889/wallet/createWallet',
  headers: { 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python " %}

```python
import requests
import json

url = "http://localhost:8889/wallet/createWallet"

payload = json.dumps({
  "name": "sep",
  "algorithm": "secp256k1"
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "http://localhost:8889/wallet/createWallet"
  method := "POST"

  payload := strings.NewReader(`{
    "name": "sep",
    "algorithm": "secp256k1"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.krypcore.com/dev-docs/api-reference/core-service-apis/wallet-manager/self-managed-wallet/create-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
