> For the complete documentation index, see [llms.txt](https://docs.on.nexus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.on.nexus/hodifi/developers/submit-loan/submit-loan.md).

# Submit Loan

If it is the first time to create, it is empty.

## Obtain Loan Data

> User Lending Data

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/nexus/manage/your_lending":{"post":{"summary":"Obtain Loan Data","deprecated":false,"description":"User Lending Data","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"btc_address":{"type":"string","title":"BTC Wallet Address"},"eth_address":{"type":"string","title":"ETH Wallet Address"}},"required":["btc_address","eth_address"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"data":{"type":"object","properties":{"total_lending":{"type":"integer","title":"Total Lending","description":"Total Borrowing"},"annual_rate":{"type":"string","title":"Annual Percentage Rate"},"total_supply":{"type":"integer","description":"Current Borrowing","title":"Total Supply"},"lending_in_progress":{"type":"integer","description":"Current Collateral","title":"Lending In Progress"},"average_annual_rate":{"type":"string","title":"Average APR"},"cumulative_average_apr":{"type":"string","title":"Cumulative Average APR"}},"required":["total_lending","lending_in_progress","total_supply","average_annual_rate","cumulative_average_apr","annual_rate"]}},"required":["code","data"]}}},"headers":{}}}}}}}
```

If it is the first time creating or if it is empty, the ETH wallet needs to be signed for verification upon login.

## Retrieve Deribit information

> Submit Loan Application

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/nexus/manage/deribit/info":{"post":{"summary":"Retrieve Deribit information","deprecated":false,"description":"Submit Loan Application","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"object","properties":{"message":{"type":"string","title":"Original Message"},"eth_signature":{"type":"string","title":"ETH Signature"}},"required":["message","eth_signature"]}},"required":["signature"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"msg":{"type":"string"},"data":{"type":"object","properties":{"deribit_client_id":{"type":"string"},"deribit_secret":{"type":"string"}},"required":["deribit_client_id","deribit_secret"]},"req_id":{"type":"string"}},"required":["code","msg","data","req_id"]}}},"headers":{}}}}}}}
```

## POST /api/nexus/manage/submit\_loan

> Submit Loan

```json
{"openapi":"3.0.1","info":{"title":"Default Module","version":"1.0.0"},"servers":[{"url":"http://127.0.0.1:8090","description":"Local"}],"security":[],"paths":{"/api/nexus/manage/submit_loan":{"post":{"summary":"Submit Loan","deprecated":false,"description":"","tags":[],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"total_loan":{"type":"integer"},"annual_rate":{"type":"number"},"deribit_client_id":{"type":"string"},"deribit_secret":{"type":"string"},"update_deribit_info":{"type":"boolean"},"signature":{"$ref":"#/components/schemas/HodlFi%20Nexus%20Signature%20Only%20Eth"}},"required":["total_loan","annual_rate","deribit_client_id","deribit_secret","update_deribit_info","signature"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer"},"data":{"type":"object","properties":{}},"msg":{"type":"string"},"req_id":{"type":"string"}},"required":["code","data","msg","req_id"]}}},"headers":{}}}}}},"components":{"schemas":{}}}
```


---

# 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.on.nexus/hodifi/developers/submit-loan/submit-loan.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.
