### Start Loan - Submit API Call Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Submits the signed PSBT to finalize the loan start process. Requires the signed PSBT in base64 format and the prepare offer ID from the previous step. A successful response returns the loan transaction ID. ```http POST /borrower/loans/start/submit { "signed_psbt_base_64": "cHNidP8…", "prepare_offer_id": "" } ``` -------------------------------- ### Start Loan - Prepare API Call Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Initiates the loan process by preparing the transaction. Requires offer ID, fee rate, token amount, and borrower's payment and ordinal addresses/public keys. The server responds with a PSBT and signing hints. ```http POST /borrower/loans/start/prepare { "instant_offer_id": "", "fee_rate": 12, "token_amount": "80000", "borrower_payment_address": "bc1q…", "borrower_payment_pubkey": "02ab…", "borrower_ordinal_address": "bc1p…", "borrower_ordinal_pubkey": "03cd…" } ``` -------------------------------- ### Repay Loan - Prepare API Call Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Prepares the loan repayment transaction. Similar to starting a loan, it uses an offer ID and returns the PSBT, signing information, and UTXO content details. ```http POST /borrower/loans/repay/prepare ``` -------------------------------- ### Liquidium API Endpoints for Collateral and Offers Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Lists the API endpoints for retrieving information about supported Runes, their details, and loan offers. Includes methods for listing runes, getting rune details by ID, and quoting offers based on rune amount. ```APIDOC GET /borrower/collateral/runes - Lists all supported runes. GET /borrower/collateral/runes/{runeId} - Retrieves details for a specific rune, including valid ranges for borrowing. - Parameters: - runeId: The identifier of the rune. GET /borrower/collateral/runes/{runeId}/offers?rune_amount= - Quotes loan offers for a specified amount of a rune. - Parameters: - runeId: The identifier of the rune. - rune_amount: The amount of the rune for which to get offers. ``` -------------------------------- ### API Documentation - OpenAPI Schema Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Provides information on accessing the full machine-readable OpenAPI specification, which can be imported into tools like Swagger or Postman. ```APIDOC OpenAPI Schema: Location: /openapi.json Description: Full machine-readable specification for API integration. Importable Formats: Swagger, Postman ``` -------------------------------- ### Monitor Portfolio API Call Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Retrieves the status of all offers, both active and historical. The response includes the state machine progression for each loan. ```http GET /borrower/portfolio ``` -------------------------------- ### Repay Loan - Submit API Call Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Submits the signed PSBT for loan repayment. Requires the signed PSBT and the offer ID. A successful response provides the repayment transaction ID. ```http POST /borrower/loans/repay/submit ``` -------------------------------- ### Authentication Flow - Header Template Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md This snippet shows the required header template for authenticated API calls to Liquidium. It includes the Bearer API key and the user JWT for authorization. ```APIDOC Authorization: Bearer x-user-token: Content-Type: application/json ``` -------------------------------- ### Error Model Structure Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Defines the standard JSON structure for API errors, including an error code enum and an optional human-readable error message. ```json { "error": "BAD_REQUEST", // ENUM "errorMessage": "Invalid …" // optional human text } ``` -------------------------------- ### JWT Token Schema Source: https://github.com/ropl-btc/liquidium-api/blob/main/README.md Defines the structure of the JWT token issued by Liquidium upon successful authentication. It includes header information and payload details like payment/ordinals addresses, issued-at, and expiry. ```json { "alg": "HS256", "typ": "JWT" } { "payment_address": "bc1q…", "ordinals_address": "bc1p…", "iat": 1714245123, "exp": 1714504323 } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.