# Derive And Sync New Receiving Addresses XRP

Through this endpoint users can derive 100 receiving addresses, starting from the last index we have data for, which are then added to the xPub, subscribed for syncing, and start recording data. If no data is available, it will start from index 0. We use type P2WPKH.


> **Warning:** Deriving addresses will lead to additional credits consumption on daily bases! Please, refer to **Data Flow Limiting** in the **General Information** section for details.

- **Endpoint:** `POST https://rest.cryptoapis.io/hd-wallets/{blockchain}/{network}/{extendedPublicKey}/addresses/derive-and-sync`
- **Authentication:** `x-api-key` header
- **Credits cost:** 35 credits for 1 result by default; per blockchain: XRP: 35
- **Documentation page:** https://developers.cryptoapis.io/v-2.2024-12-12-175/RESTapis/hd-wallet-data-xrp/derive-and-sync-new-receiving-addresses-xrp/post

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `blockchain` | string | yes | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc. Allowed values: `xrp`. |
| `extendedPublicKey` | string | yes | Defines the account extended publicly known key which is used to derive all child public keys. |
| `network` | string | yes | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - "mainnet" is the live network with actual data while networks like "testnet", "sepolia" are test networks. Allowed values: `mainnet`, `testnet`. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |

## Request body (application/json)

```json
{
  "context": "yourExampleString",
  "data": {
    "item": {}
  }
}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.item` | object | yes |  |

## Responses

| Status | Description |
| --- | --- |
| 200 | Successfull Request |
| 400 | 400 |
| 401 | 401 |
| 402 | 402 |
| 403 | 403 |
| 409 | The data provided seems to be invalid. |
| 415 | The selected Media Type is unavailable. The Content-Type header should be 'application/json'. |
| 422 | Your request body for POST requests must have a structure of { data: { item: [...properties] } } |
| 429 | The request limit has been reached. There can be maximum {requests} requests per {seconds} second(s) made. Please contact our team via email if you need more or upgrade your plan. |
| 500 | An unexpected server error has occurred, we are working to fix this. Please try again later and in case it occurs again please report it to our team via email. |

### Example 200 response

```json
{
  "apiVersion": "2024-12-12",
  "requestId": "601c1710034ed6d407996b30",
  "context": "yourExampleString",
  "data": {
    "limit": 50,
    "offset": 0,
    "total": 100,
    "items": [
      {
        "address": "rPf1QXeQonoLbA7TH2Ad2gtmPnK5iA2GDq",
        "derivationType": "account",
        "format": "P2WPKH",
        "index": 1,
        "type": "change"
      }
    ]
  }
}
```

### 200 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `apiVersion` | string | yes | Specifies the version of the API that incorporates this endpoint. |
| `requestId` | string | yes | Defines the ID of the request. The `requestId` is generated by Crypto APIs and it's unique for every request. |
| `context` | string | no | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. |
| `data` | object | yes |  |
| `data.limit` | integer | yes | Defines how many items should be returned in the response per page basis. |
| `data.offset` | integer | yes | The starting index of the response items, i.e. where the response should start listing the returned items. |
| `data.total` | integer | yes | Defines the total number of items returned in the response. |
| `data.items` | array of object | yes |  |
| `data.items[].address` | string | yes | Represents the public address, which is a compressed and shortened form of a public key. |
| `data.items[].derivationType` | string | yes | Represents the derivation type |
| `data.items[].format` | string | yes | Represents the format of the address. |
| `data.items[].index` | integer | yes |  |
| `data.items[].type` | string | yes | Defines the address type. |
