> For the complete documentation index, see [llms.txt](https://wiki.relictum.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.relictum.pro/developing/relictum-finance/purchase.md).

# Purchase

The request allows you to create a USDR purchase order for the selected cryptocurrency. The response contains information about the created order, including the created order ID, which must be saved. After the end user transfers funds to the address received in the response, USDRs will be transferred to the specified address of the Relictum network automatically, and the status of the created transaction will change, and the cryptobank will notify you about that fact with a callback request to the URL specified in the settings of your API key.

Response sample

```json
POST
https://relictum.finance/api/v1/finance/buy
Content-Type: application/json

// Options

{
	"api_key": " RELICTUM_FINANCE_API_KEY ",
	"currency": "USDT-TRX",
	"sum": "200",
	"relictum": "relictum_recipient_wallet_address",
	"email": "test@relictum.finance"
}

// Response

{
   "success":true,
   "transaction":{
      "id":374,
      "sum":200,
      "sum_currency":201,
      "status":0,
      "gate":{
         "title":"USDT Tron",
         "alias":"usdt-tron",
         "min_sum":10,
         "max_sum":100000,
         "rate":1,
         "gateCurrency":{
            "code":"USDT-TRX",
            "title":"Tether Tron TRC-20",
            "type":"crypto"
         },
         "data":{
            "send_paysys_identificator":"USDTTRC",
            "dec_digits":4,
            "icon":"https://dev.relictum.finance/img/gate/usdttrc20.svg",
            "networks":[
               "TRC20"
            ],
            "percent_fee":0,
            "min_fee":1
         }
      },
      "user":{
         "username":"test@relictum.finance",
         "email":"test@relictum.finance"
      },
      "created_at":"2021-08-16 16:30:48",
      "updated_at":"2021-08-16 16:30:48",
      "transaction_address":"TNhVvX9Tjmmu19MaL77bEYs7TxqPkczVM4",
      "data":{
         "relictum":"relictum_recipient_wallet_address",
         "course":1,
         "percent_fee":0,
         "min_fee":1,
         "fee":1
      }
   }
}
```

* relictum — The address to which USDR will be sent.
* email — End user's email address.


---

# 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, and the optional `goal` query parameter:

```
GET https://wiki.relictum.pro/developing/relictum-finance/purchase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
