---
title: "Buy testnet coins"
method: POST
path: "/api/v1/services/testnet/buy/coins"
tags: ["testnet_service"]
---

# Buy testnet coins

`POST /api/v1/services/testnet/buy/coins`

## Request

- Base URL: `http://localhost:8888`
- URL: `http://localhost:8888/api/v1/services/testnet/buy/coins`
- Auth: none declared

## Query parameters

- `project_id` integer, required

## Request body

- object
  - `address` string, required
  - `coins` integer, required: nano ton are expected

## Response `200`

Message hash

- object
  - `hash` string, required

## Other responses

- `400`: Something went wrong on client side
- `403`: Access token is missing or invalid
- `404`: The specified resource was not found
- `500`: Something went wrong on server side

## Changes

- **2023-08-02** `c88a633eda12`: 1 breaking, 59 info
  - for the `query` request parameter `project_id`, the format changed from `int64` to `uint32`
  - the endpoint scheme security `JWTAuth` was removed from the API
  - added the non-success response with the status `403`
  - removed the `1.00` enum value from the `code` response property for the response status `400`
  - …56 more
- **2023-07-19** `3cd5bedae16b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/changes/api/v1/services/testnet/buy/coins/post.md)

---

[API](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console.md) - [All operations](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/llms.txt) - [OpenAPI document](https://skmtc.dev/tonkeeper/apis/rest-api-to-ton-console/revisions/bffcc11719d3?raw)
