### GET /api/v1/portfolio Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves a comprehensive portfolio overview including active loans, lending offers, borrowing positions, and transaction history. **Authentication Options (choose one):** • **Option 1 (Standard):** Use `x-user-token` header for authenticated users • **Option 2 (Alternative):** Use query parameters `ordinals_address` + `payment_address` for address-based lookup **Important:** When using query parameters, both addresses must be supplied and resolve to a valid user account. ```markdown ### Parameters - **ordinals_address** (string, query, optional): **OPTIONAL** - Bitcoin ordinals address for alternative user authentication. Use this instead of x-user-token header. If provided, payment_address is also required and both must resolve to a valid user (no fallback). (example: "bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297") - **payment_address** (string, query, optional): **OPTIONAL** - Bitcoin payment address for alternative user authentication. Use this instead of x-user-token header. If provided, ordinals_address is also required and both must resolve to a valid user (no fallback). (example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh") ### Responses #### 200 - Successful response with portfolio details including lending and borrowing positions - **lender** (object) (required) - **runes** (object) (required) - **offers** (array (object)) (required) Array items: - **id** (string) (required): ID of the instant offer (example: "123e4567-e89b-12d3-a456-426614174000") - **instant_offer_details** (object) (required) - **state** (string (OFFERED|PAUSED)) (required): Current state of the instant offer (example: "OFFERED") ("OFFERED"|"PAUSED") - **paused_reason** (string): Reason for pausing the instant offer, if applicable (example: "Insufficient balance") - **vault_address** (string) (required): Address of the vault holding the collateral (example: "bc1qvaultaddressxyz...") - **vault_pubkey** (string) (required): Public key of the vault (example: "02abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890") - **loan_term_days** (number) (required): Duration of the loan term in days (example: 30) - **interest_rate_percentage** (number) (required): Interest rate percentage for the loan term (example: 5.5) - **principal_amount_sats** (number) (required): Original loan principal amount in satoshis (example: 50000000) - **ltv_max** (number) (required): Maximum loan-to-value ratio for the offer (example: 70) - **auto_principal_amount_used_sats** (number) (required): Principal amount used for loans in satoshis, only for Instant Rune loan offers (example: 25000000) - **collateral_details** (object) (required) - **collateral_type** (string (Rune|Brc20|Inscription)) (required): Type of asset used as collateral (example: "Rune") ("Rune"|"Brc20"|"Inscription") - **rune_id** (string) (required): Rune ID of the rune token used as collateral (for Instant Rune loans only) (example: "840010:907") - **rune_divisibility** (number) (required): Divisibility of the rune token used as collateral (for Instant Rune loans only) (example: 8) - **rune_amount** (number) (required): Amount of rune tokens used as collateral (for Instant Rune loans only) (example: 10000) - **loans** (array (object)) (required) Array items: - **id** (string) (required): ID of the loan offer in the system (example: "123e4567-e89b-12d3-a456-426614174000") - **loan_details** (object) (required) - **state** (string (OFFERED|ACCEPTED|ACTIVATING|ACTIVE|REPAYING|REPAID|DEFAULTED|CLAIMING|CLAIMED|LIQUIDATING|LIQUIDATED|CANCELLED|FAILED)) (required): Current state of the loan offer (OFFERED, ACCEPTED, ACTIVE, REPAID, etc.) (example: "ACTIVE") ("OFFERED"|"ACCEPTED"|"ACTIVATING"|"ACTIVE"|"REPAYING"|"REPAID"|"DEFAULTED"|"CLAIMING"|"CLAIMED"|"LIQUIDATING"|"LIQUIDATED"|"CANCELLED"|"FAILED") - **total_repayment_sats** (number) (required): Total amount required for repayment taking the borrowers discount and interest amount into consideration (example: 50000000) - **principal_amount_sats** (number) (required): Original loan principal amount in satoshis (example: 50000000) - **interest_rate_percentage** (number) (required): Interest rate percentage for the loan term (example: 5.5) - **loan_term_days** (number) (required): Duration of the loan term in days (example: 30) - **loan_term_end_date** (string) (required): Deadline for loan repayment in ISO 8601 format. Should not be null unless there is an internal error. (example: "2025-03-27T14:30:00Z") - **start_date** (string) (required): Date when the loan was activated in ISO 8601 format. Should not be null unless there is an internal error. (example: "2025-02-25T14:30:00Z") - **escrow_address** (string) (required): Bitcoin address holding the collateral during the loan term (example: "bc1qc7slrfxkknqcq2jevvvkdgvrt8080852dfjewde450xdlk4ugp7szw5tk9") - **discount** (object) (required) - **discount_rate** (number) (required): Discount percentage on liquidium fee due to holding liquidium token (example: 0.15) - **discount_sats** (number) (required): Discount sats on liquidium fee due to holding liquidium token (example: 2000) - **collateral_details** (object) (required) - **ordinals** (object) (required) - **offers** (array (object)) (required) Array items: - **id** (string) (required): ID of the instant offer (example: "123e4567-e89b-12d3-a456-426614174000") - **instant_offer_details** (object) (required) - **state** (string (OFFERED|PAUSED)) (required): Current state of the instant offer (example: "OFFERED") ("OFFERED"|"PAUSED") - **paused_reason** (string): Reason for pausing the instant offer, if applicable (example: "Insufficient balance") - **vault_address** (string) (required): Address of the vault holding the collateral (example: "bc1qvaultaddressxyz...") - **vault_pubkey** (string) (required): Public key of the vault (example: "02abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890") - **loan_term_days** (number) (required): Duration of the loan term in days (example: 30) - **interest_rate_percentage** (number) (required): Interest rate percentage for the loan term (example: 5.5) - **principal_amount_sats** (number) (required): Original loan principal amount in satoshis (example: 50000000) - **ltv_max** (number) (required): Maximum loan-to-value ratio for the offer (example: 70) - **collateral_details** (object) (required) - **collateral_type** (string (Rune|Brc20|Inscription)) (required): Type of asset used as collateral (example: "Rune") ("Rune"|"Brc20"|"Inscription") - **collection_slug** (string) (required): Slug of the collection for the collateral (for Instant Ordinal loans only) (example: "bitcoin-puppets") - **loans** (array (object)) (required) Array items: - **id** (string) (required): ID of the loan offer in the system (example: "123e4567-e89b-12d3-a456-426614174000") - **loan_details** (object) (required) - **collateral_details** (object) (required) - **collateral_type** (string (Rune|Brc20|Inscription)) (required): Type of asset used as collateral (example: "Rune") ("Rune"|"Brc20"|"Inscription") - **inscription_id** (string) (required): Inscription ID for the inscription used as collateral (for Instant Ordinal loans only) (example: "f86f29a4e8ec617f5b277aa8d2cc2372aadd577a31aa34e3fd75beda84c39e0di0") - **inscription_number** (number) (required): Inscription Number of the inscription used as collateral (for Instant Ordinal loans only) (example: 12345) - **inscription_name** (string) (required): Name of the inscription used as collateral (for Instant Ordinal loans only) (example: "My Inscription") - **collection_slug** (string) (required): Slug of the collection for the collateral (for Instant Ordinal loans only) (example: "bitcoin-puppets") - **borrower** (object) (required) - **runes** (object) (required) - **loans** (array (object)) (required) Array items: - **ordinals** (object) (required) - **loans** (array (object)) (required) Array items: #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/portfolio?ordinals_address=bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297&payment_address=bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" ``` ``` -------------------------------- ### GET /api/v1/user/balance Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves the Bitcoin balance for a given payment address. Returns two balance values: - **confirmed_balance_sats**: Raw on-chain confirmed balance from all UTXOs - **available_balance_sats**: Balance available for Liquidium lending (filters out collateral && dust UTXOs <1000 sats utxos) **No authentication required.** Simply provide the `payment_address` query parameter. ```markdown ### Parameters - **payment_address** (string, query, required): Bitcoin payment address to get the balance for. No authentication required. (example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh") ### Responses #### 200 - Successful response with user balance details - **confirmed_balance_sats** (number) (required): On-chain confirmed balance in satoshis. This represents the total balance from all confirmed UTXOs on the Bitcoin blockchain (funded_txo_sum - spent_txo_sum). This is the raw on-chain balance without any filtering. (example: 264505) - **available_balance_sats** (number) (required): Available balance in satoshis that Liquidium can use for lending. This is calculated by the oracle and filters out: (1) UTXOs locked as collateral in active loans, (2) UTXOs smaller than 1000 sats (dust), and (3) UTXOs currently used as inputs in pending mempool transactions. This is the balance Liquidium uses for balance checks and represents what can actually be used for lending operations. Typically lower than confirmed_balance_sats due to these filters. (example: 257305) - **payment_address** (string) (required): The Bitcoin payment address for which the balance was retrieved (example: "bc1qz9rh0hcqatg8mglc62kdlfnz73jgt39sk8j56g") #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/user/balance?payment_address=bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" ``` ``` -------------------------------- ### GET /api/v1/borrower/collateral/ordinals/{collection_slug}/offers Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves a list of available instant loan offers for a specific ordinal collection. Returns the best offers for each loan term, excluding the requesting user's own offers. Each offer includes loan breakdown details with interest calculations, activation fees, and discount information for users holding Liquidium tokens. **Authentication Options (choose one):** • **Option 1 (Standard):** Use `x-user-token` header for authenticated users • **Option 2 (Alternative):** Use query parameters `ordinals_address` + `payment_address` for address-based lookup **Important:** When using query parameters, both addresses must be supplied and resolve to a valid user account. ```markdown ### Parameters - **collection_slug** (string, path, required): The unique identifier for the collection (example: "bitcoin-puppets") - **ordinals_address** (string, query, optional): **OPTIONAL** - Bitcoin ordinals address for alternative user authentication. Use this instead of x-user-token header. If provided, payment_address is also required. When the address pair matches an existing user, their offers are filtered out and token discounts are applied. If no user exists yet, the request still succeeds without those adjustments. (example: "bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297") - **payment_address** (string, query, optional): **OPTIONAL** - Bitcoin payment address for alternative user authentication. Use this instead of x-user-token header. If provided, ordinals_address is also required. Matching an existing user enables filtering/discounts; otherwise the request continues without personalization. (example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh") ### Responses #### 200 - Successfully retrieved available loan offers for the specified ordinal collection - **ordinalDetails** (object) (required) - **collection_slug** (string) (required): Collateral collection slug (example: "bitcoin-puppets") - **floor_price_sats** (number) (required): Floor price in satoshis (example: 170000) - **floor_price_last_updated_at** (string (date-time)) (required): Timestamp of the last floor update for the collection (example: "2025-02-11T09:40:04.192Z") - **common_offer_data** (object) (required) - **interest_rate** (number) (required): Common interest rate percentage for all offers (example: 0.02) - **offers** (array (object)) (required): List of unique offer details Array items: - **offer_id** (string) (required): Internal ID of the instant offer (example: "82d3cd59-7fb6-457b-b6df-887cbee9e39a") - **loan_term_days** (integer) (required) - **ltv_rate** (number) (required): LTV percentage (example: 80) - **loan_breakdown** (object) (required): Breakdown of loan repayment details - **total_repayment_sats** (number) (required): Total amount required for repayment taking the borrowers discount and interest amount into consideration (example: 138720) - **principal_sats** (number) (required): Principal loan amount in sats (example: 136000) - **interest_sats** (number) (required): Interest amount in sats (example: 2720) - **loan_due_by_date** (string (date-time)) (required): Due date for the loan repayment (example: "2025-03-11T09:40:04.192Z") - **activation_fee_sats** (number) (required): Platform fee in satoshis taken to start the loan, added as an output on the start loan transaction (example: 1000) - **discount** (object) (required) - **discount_rate** (number) (required): Discount percentage on liquidium fee due to holding liquidium token (example: 0.15) - **discount_sats** (number) (required): Discount sats on liquidium fee due to holding liquidium token (example: 2000) #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/borrower/collateral/ordinals/{collection_slug}/offers?ordinals_address=bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297&payment_address=bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh" ``` ``` -------------------------------- ### GET /api/v1/borrower/collateral/runes Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves a comprehensive list of all supported rune tokens that can be used as collateral for instant loans. Each entry includes rune information, floor prices, decimal precision, and loan terms. Optionally includes counts for available offers and active loans. ```markdown ### Parameters - **include_offers_count** (boolean, query, optional): Optional flag to include the count of offers available for each rune (example: true) - **include_active_count** (boolean, query, optional): Optional flag to include the count of active offers for each rune (example: false) ### Responses #### 200 - Successful response with collateral details - **runes** (array (object)) (required): List of supported collateral runes with details Array items: - **rune_id** (string) (required): Collateral rune identifier (example: "rune-1") - **slug** (string) (required): A friendly URL slug for the collateral (example: "rune-one") - **price_sats** (number) (required): Floor price in satoshis (example: 100) - **available_offers_count** (number): Optional count of total offers available for this rune (example: 5) - **active_offers_count** (number): Optional count of active offers for this rune (example: 3) #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/borrower/collateral/runes?include_offers_count=true&include_active_count=false" ``` ``` -------------------------------- ### GET /api/v1/borrower/collateral/runes/{runeId} Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves comprehensive details for a specific rune token including floor price, decimal precision, loan terms, and optional counts for available offers and active loans. ```markdown ### Parameters - **runeId** (string, path, required): Id of rune (example: "840010:907") - **include_offers_count** (boolean, query, optional): Optional flag to include the count of offers available for the rune (example: true) - **include_active_count** (boolean, query, optional): Optional flag to include the count of active offers for the rune (example: false) ### Responses #### 200 - Successful response with collateral details - **rune_id** (string) (required): Collateral rune identifier (example: "840010:907") - **slug** (string) (required): Rune slug (example: "LIQUIDIUMTOKEN") - **floor_price_sats** (number) (required): Floor price in satoshis (example: 174.88) - **available_offers_count** (number): Optional count of total offers available for this rune (example: 1) - **active_offers_count** (number): Optional count of active offers for this rune (example: 0) - **valid_ranges** (object) (required) - **rune_amount** (object) (required) - **ranges** (array (object)) (required): Explicit valid ranges for rune amounts Array items: - **min** (string) (required): Minimum amount in this range (as string for precision) (example: "62277") - **max** (string) (required): Maximum amount in this range (as string for precision) (example: "62900") - **loan_term_days** (array (number)) (required): Valid loan term days #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/borrower/collateral/runes/{runeId}?include_offers_count=true&include_active_count=false" ``` ``` -------------------------------- ### GET /api/v1/borrower/collateral/runes/{runeId}/offers Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves available instant loan offers for a specific rune amount. Returns offers that match the specified rune amount within their valid ranges, excluding the requesting user's own offers. Each offer includes loan breakdown details with interest calculations, activation fees, and discount information for users holding Liquidium tokens. ```markdown ### Parameters - **runeId** (string, path, required): The unique identifier for the rune (example: "840010:907") - **rune_amount** (string, query, required): The amount of runes to query for (as a string to preserve precision) (example: "60000") ### Responses #### 200 - Successfully retrieved available loan offers for the specified rune amount - **runeDetails** (object) (required) - **rune_id** (string) (required): Collateral rune identifier (example: "840010:907") - **slug** (string) (required): A friendly URL slug for the collateral (example: "LIQUIDIUMTOKEN") - **floor_price_sats** (number) (required): Floor price in satoshis (example: 170000) - **floor_price_last_updated_at** (string (date-time)) (required): Timestamp of the last floor update for the collection (example: "2025-02-11T09:40:04.192Z") - **common_offer_data** (object) (required) - **interest_rate** (number) (required): Common interest rate percentage for all offers (example: 0.02) - **rune_divisibility** (number) (required): Common number of rune divisibility for all offers (example: 2) - **valid_ranges** (object) (required) - **rune_amount** (object) (required) - **ranges** (array (object)) (required): Explicit valid ranges for rune amounts Array items: - **min** (string) (required): Minimum amount in this range (as string for precision) (example: "62277") - **max** (string) (required): Maximum amount in this range (as string for precision) (example: "62900") - **loan_term_days** (array (number)) (required): Valid loan term days - **offers** (array (object)) (required): List of unique offer details Array items: - **offer_id** (string) (required): Internal ID of the instant offer (example: "82d3cd59-7fb6-457b-b6df-887cbee9e39a") - **fungible_amount** (number) (required): Fungible amount (example: 200000) - **loan_term_days** (integer,null) - **ltv_rate** (number) (required): LTV percentage (example: 80) - **loan_breakdown** (object) (required): Breakdown of loan repayment details - **total_repayment_sats** (number) (required): Total amount required for repayment taking the borrowers discount and interest amount into consideration (example: 138720) - **principal_sats** (number) (required): Principal loan amount in sats (example: 136000) - **interest_sats** (number) (required): Interest amount in sats (example: 2720) - **loan_due_by_date** (string (date-time)) (required): Due date for the loan repayment (example: "2025-03-11T09:40:04.192Z") - **activation_fee_sats** (number) (required): Platform fee in satoshis taken to start the loan, added as an output on the start loan transaction (example: 1000) - **discount** (object) (required) - **discount_rate** (number) (required): Discount percentage on liquidium fee due to holding liquidium token (example: 0.15) - **discount_sats** (number) (required): Discount sats on liquidium fee due to holding liquidium token (example: 2000) #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/borrower/collateral/runes/{runeId}/offers?rune_amount=60000" ``` ``` -------------------------------- ### POST /api/v1/borrower/loans/start/prepare Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Prepares an instant loan transaction by creating a Partially Signed Bitcoin Transaction (PSBT) that the borrower needs to sign. The endpoint validates the loan parameters, checks collateral availability, and constructs the transaction with proper inputs and outputs including activation fees. ```markdown ### Request Body **Content-Type:** application/json - **instant_offer_id** (string) (required): UUID of the instant loan offer to be activated (example: "123e4567-e89b-12d3-a456-426614174000") - **fee_rate** (number) (required): Transaction fee rate in satoshis per virtual byte (sat/vB) (example: 5) - **borrower_payment_address** (string) (required): Bitcoin payment address of the borrower for receiving loan funds (example: "bc1qc7slrfxkknqcq2jevvvkdgvrt8080852dfjewde450xdlk4ugp7szw5tk9") - **borrower_payment_pubkey** (string) (required): Public key corresponding to the borrower's payment address (example: "02e7ab1a2a2876386601a8b9f4cb9b87c25d5c543f013a0b8bec463e8cad6d1ef6") - **borrower_ordinal_address** (string) (required): Taproot address of the borrower for handling ordinals and inscriptions (example: "bc1p3hj4ev5ld2qjcjvhwyngyjn64qk6zs2lyw4chapva05gt5yqknasn6gvqe") - **borrower_ordinal_pubkey** (string) (required): Public key corresponding to the borrower's taproot address (example: "0330a5a9a4dfbd13844f13f39d173427bf30e40f9eced207af3dfd2398d5def3e9") - **borrower_wallet** (string (xverse|orange|satgo|phantom|leather|magicEden|unisat|okx|wizz)) (required): Type of wallet used for login (example: "xverse") ("xverse"|"orange"|"satgo"|"phantom"|"leather"|"magicEden"|"unisat"|"okx"|"wizz") - **token_amount** (string) (required): Amount of tokens/runes to use as collateral, expressed as a string representation of the raw value before decimal adjustment. For example, for a rune with 2 decimal places, a user amount of 800 would be entered as '80000' (800 * 10^2) (example: "80000") - **inscription_id** (string): This field must not be present for rune loans. ### Responses #### 200 - Successfully prepared loan start transaction with PSBT and request UUID for submission - **prepare_offer_id** (string) (required): ID of the prepared loan activation transaction (example: "123e4567-e89b-12d3-a456-426614174000") - **base64_psbt** (string) (required): Base64-encoded Partially Signed Bitcoin Transaction (PSBT) that requires borrower signature (example: "cHNidP8BAHECAAAAAXgUQB7r1lj3gHBFCKGJqQiPJLs11R7LUiC5qhRKgn3wAAAAAAD/////AhAnAAAAAAAAFgAUaBQ/RZaZ7D4wagulC2/+kqocLO4A4fUFAAAAABepFNi369DMyAJmqX7Jn36qxQfKQF7khwAAAAAAAQEfGAwCAAAAACJRIP+z1e98NywcJQBMjsOfMW6BY7oPrkFT3P/iJw1ZteLnAQ==") - **sides** (array (object)) (required): List of all inputs in the transaction that require signatures, with their signing parameters Array items: - **index** (number) (required): Zero-based index of this input in the PSBT transaction (example: 0) - **address** (string) (required): Bitcoin address associated with this input, or null if not available (example: "bc1qc7slrfxkknqcq2jevvvkdgvrt8080852dfjewde450xdlk4ugp7szw5tk9") - **sighash** (number) (required): Signature hash type for this input (1=ALL, 2=NONE, 3=SINGLE, etc.), or null if not applicable (example: 1) - **disable_tweak_signer** (boolean) (required): Should tweaking be disabled (example: false) #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X POST "https://api.example.com/api/v1/borrower/loans/start/prepare" \ -H "Content-Type: application/json" \ -d '{ "instant_offer_id": "123e4567-e89b-12d3-a456-426614174000", "fee_rate": 5, "borrower_payment_address": "bc1qc7slrfxkknqcq2jevvvkdgvrt8080852dfjewde450xdlk4ugp7szw5tk9", "borrower_payment_pubkey": "02e7ab1a2a2876386601a8b9f4cb9b87c25d5c543f013a0b8bec463e8cad6d1ef6", "borrower_ordinal_address": "bc1p3hj4ev5ld2qjcjvhwyngyjn64qk6zs2lyw4chapva05gt5yqknasn6gvqe", "borrower_ordinal_pubkey": "0330a5a9a4dfbd13844f13f39d173427bf30e40f9eced207af3dfd2398d5def3e9", "borrower_wallet": "xverse", "token_amount": "80000", "inscription_id": "string" }' ``` ``` -------------------------------- ### GET /api/v1/borrower/collateral/ordinals/{inscription_id}/slug Source: https://liquidium-inc.github.io/liquidium-platform/docs-v1-internal-b8f3e2a9/openapi.json Retrieves the collection group slug that an inscription belongs to. For partitioned collections like OMB, returns the specific partition slug (e.g., 'omb-color-black'). ```markdown ### Parameters - **inscription_id** (string, path, required): Inscription ID (example: "abc123...xyz789") ### Responses #### 200 - Successfully retrieved the collection slug for the inscription - **slug** (string) (required): Collection group slug that the inscription belongs to (example: "omb-color-black") #### 400 - Bad Request - The request was malformed or contained invalid parameters - **error** (string) (required) - **errorMessage** (string) #### 401 - Unauthorized - Authentication is required or the provided credentials are invalid - **error** (string) (required) - **errorMessage** (string) #### 403 - Forbidden - The authenticated user doesn't have permission to access this resource - **error** (string) (required) - **errorMessage** (string) #### 404 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 405 - Not Found - The requested resource does not exist - **error** (string) (required) - **errorMessage** (string) #### 409 - Conflict - The request conflicts with the current state of the server - **error** (string) (required) - **errorMessage** (string) #### 422 - Unprocessable Entity - The request was well-formed but contains semantic errors - **error** (string) (required) - **errorMessage** (string) #### 429 - Too Many Requests - Rate limit exceeded, please try again later - **error** (string) (required) - **errorMessage** (string) #### 500 - Internal Server Error - An unexpected error occurred on the server - **error** (string) (required) - **errorMessage** (string) ### Example Usage ```bash curl -X GET "https://api.example.com/api/v1/borrower/collateral/ordinals/{inscription_id}/slug" ``` ```