> ## Documentation Index
> Fetch the complete documentation index at: https://kamino.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Borrow & Lend

> Learn how to build with Borrow

## Overview

Build lending applications on Solana using the Kamino TypeScript SDK, the Rust interface crate, or the REST API. This guide covers everything from basic setup to advanced transaction building for deposit, borrow, repay, and withdraw operations.

## Key Components of Borrow Integration

<CardGroup cols={3}>
  <Card title="Lending Operations" icon="coins">
    Deposit collateral, borrow assets, repay debt, and withdraw - complete
    lending lifecycle management.
  </Card>

  <Card title="Loan Management" icon="shield-check">
    LTV ratios, health factors, obligation status and position monitoring for
    safe lending.
  </Card>

  <Card title="Market Analytics" icon="chart-line">
    APY tracking, utilization rates, reserve metrics from API and on-chain data.
  </Card>
</CardGroup>

## Integration Options

<CardGroup cols={3}>
  <Card title="Public API" icon="globe">
    Access market data, borrow rates, reserve liquidity, and obligation status via REST endpoints. Language-agnostic.
  </Card>

  <Card title="TypeScript SDK" icon="code">
    On-chain reads and transaction building for deposit, borrow, repay, and withdraw. TS/JS only.
  </Card>

  <Card title="Rust Interface Crate" icon="rust">
    Lightweight instruction builder for Rust bots and on-chain CPI.
  </Card>
</CardGroup>

### Deposit

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    import { createSolanaRpc, address, createNoopSigner } from '@solana/kit';
    import { KaminoMarket, KaminoAction, LendingObligation } from '@kamino-finance/klend-sdk';
    import { simulateTx } from '../../utils/tx';
    import BN from 'bn.js';

    const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');
    const marketPubkey = address('DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek');
    const usdcMint = address('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');

    const market = await KaminoMarket.load(rpc, marketPubkey, 400);
    const user = address('EZC9wzVCvihCsCHEMGADYdsRhcpdRYWzSCZAVegSCfqY'); // user

    // Create a LendingObligation for depositing to earn interest
    const obligation = new LendingObligation(usdcMint, market!.programId, 0);

    const action = await KaminoAction.buildDepositReserveLiquidityTxns(
      market!,
      new BN(1_000_000), // Deposit 1 USDC * 10^6 decimals
      usdcMint,
      createNoopSigner(user),
      obligation,
      undefined
    );

    const res = await simulateTx(rpc, user, [
      ...action.computeBudgetIxs,
      ...action.setupIxs,
      ...action.lendingIxs,
      ...action.cleanupIxs,
    ], []);

    console.log('Simulation Result:', res);

    ```

    <a href="https://github.com/Kamino-Finance/klend-sdk/blob/master/examples/kvault-tutorial/earn-vaults-04-user-deposit-example/index.ts" target="_blank" rel="noopener noreferrer" class="github-link">
      <Icon icon="github" iconType="brands" size={16} />

      <span>View Code</span>
    </a>
  </Tab>

  <Tab title="Rust">
    ```rust theme={null}
    use klend_interface::helpers;
    use klend_interface::ReserveInfo;
    use klend_interface::pda;
    use klend_interface::KLEND_PROGRAM_ID;
    use solana_client::rpc_client::RpcClient;
    use solana_pubkey::Pubkey;
    use solana_sdk::signer::keypair::read_keypair_file;
    use solana_sdk::signer::Signer;
    use solana_sdk::transaction::Transaction;
    use solana_sdk::message::Message;
    use spl_associated_token_account::get_associated_token_address;
    use std::str::FromStr;

    let rpc_client = RpcClient::new("https://api.mainnet-beta.solana.com");
    let signer = read_keypair_file("/path/to/your/keypair.json")
        .expect("Failed to read keypair file");
    let owner = signer.pubkey();

    // Fetch reserve data from the chain
    let reserve_pubkey = Pubkey::from_str("D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59").unwrap();
    let reserve_data = rpc_client.get_account(&reserve_pubkey)?;
    let reserve = ReserveInfo::from_account_data(reserve_pubkey, &reserve_data.data)?;

    // Derive user token accounts
    let user_source_liquidity = get_associated_token_address(&owner, &reserve.liquidity_mint);
    let (collateral_mint, _) = pda::reserve_collateral_mint(&KLEND_PROGRAM_ID, &reserve_pubkey);
    let user_destination_collateral = get_associated_token_address(&owner, &collateral_mint);

    // Build deposit instructions (includes refresh_reserve automatically)
    let instructions = helpers::deposit::deposit(
        owner,
        &reserve,
        user_source_liquidity,
        user_destination_collateral,
        1_000_000, // 1 USDC (6 decimals)
    );

    // Build and send
    let message = Message::new(&instructions, Some(&owner));
    let recent_blockhash = rpc_client.get_latest_blockhash()?;
    let tx = Transaction::new(&[&signer], message, recent_blockhash);
    let signature = rpc_client.send_and_confirm_transaction(&tx)?;
    println!("Deposit successful! Signature: {signature}");
    ```
  </Tab>
</Tabs>

<Note>
  For the full deposit example, including transaction sending and confirmation, check out [Deposit Operations](/docs/build/developers/borrow/operations/deposit).
</Note>

### Withdraw

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    import { createSolanaRpc, address, createNoopSigner } from '@solana/kit';
    import { KaminoMarket, KaminoAction, VanillaObligation, PROGRAM_ID } from '@kamino-finance/klend-sdk';
    import { simulateTx } from '../../utils/tx';
    import BN from 'bn.js';

    const rpc = createSolanaRpc('https://api.mainnet-beta.solana.com');
    const marketPubkey = address('DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek');
    const usdcMint = address('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');

    const market = await KaminoMarket.load(rpc, marketPubkey, 400);
    const user = address('EZC9wzVCvihCsCHEMGADYdsRhcpdRYWzSCZAVegSCfqY');

    // Fetch the existing obligation from the blockchain
    const obligation = await market!.getObligationByWallet(
      user,
      new VanillaObligation(PROGRAM_ID)
    );

    if (!obligation) {
      throw new Error('No obligation found for this wallet. You must deposit first.');
    }

    const action = await KaminoAction.buildWithdrawTxns(
      market!,
      new BN(1_000_000), // Withdraw 1 USDC * 10^6 decimals
      usdcMint,
      createNoopSigner(user),
      obligation,
      true, // useV2Ixs
      undefined // scopeRefreshConfig
    );

    const res = await simulateTx(rpc, user, [
      ...action.computeBudgetIxs,
      ...action.setupIxs,
      ...action.lendingIxs,
      ...action.cleanupIxs,
    ], []);

    console.log('Simulation Result:', res);
    ```

    <a href="https://github.com/Kamino-Finance/klend-sdk/blob/master/examples/kvault-tutorial/earn-vaults-05-user-withdraw-example/index.ts" target="_blank" rel="noopener noreferrer" class="github-link">
      <Icon icon="github" iconType="brands" size={16} />

      <span>View Code</span>
    </a>
  </Tab>

  <Tab title="Rust">
    ```rust theme={null}
    use klend_interface::ObligationContext;
    use klend_interface::pda;
    use klend_interface::KLEND_PROGRAM_ID;
    use solana_client::rpc_client::RpcClient;
    use solana_pubkey::Pubkey;
    use solana_sdk::signer::keypair::read_keypair_file;
    use solana_sdk::signer::Signer;
    use solana_sdk::transaction::Transaction;
    use solana_sdk::message::Message;
    use spl_associated_token_account::get_associated_token_address;
    use std::str::FromStr;

    let rpc_client = RpcClient::new("https://api.mainnet-beta.solana.com");
    let signer = read_keypair_file("/path/to/your/keypair.json")
        .expect("Failed to read keypair file");
    let owner = signer.pubkey();

    let lending_market = Pubkey::from_str("7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF").unwrap();
    let reserve_pubkey = Pubkey::from_str("D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59").unwrap();

    // Derive and fetch the obligation
    let (obligation_pubkey, _) = pda::obligation(
        &KLEND_PROGRAM_ID, 0, 0, &owner, &lending_market,
        &Pubkey::default(), &Pubkey::default(),
    );
    let obligation_data = rpc_client.get_account(&obligation_pubkey)?;

    // Fetch all reserves referenced by the obligation
    let reserve_addrs = ObligationContext::reserve_addresses_for_obligation(&obligation_data.data)?;
    let reserve_accounts = rpc_client.get_multiple_accounts(&reserve_addrs)?;
    let reserves: Vec<(Pubkey, &[u8])> = reserve_addrs.iter()
        .zip(reserve_accounts.iter())
        .filter_map(|(addr, acc)| acc.as_ref().map(|a| (*addr, a.data.as_slice())))
        .collect();
    let ctx = ObligationContext::from_account_data(
        obligation_pubkey, &obligation_data.data, &reserves
    )?;

    // Derive user token account for the withdrawal token (e.g. USDC)
    let liquidity_mint = Pubkey::from_str("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v").unwrap();
    let user_dest_liquidity = get_associated_token_address(&owner, &liquidity_mint);

    // Build withdraw instructions (includes refresh_reserves + refresh_obligation)
    let instructions = ctx.withdraw(
        owner,
        &reserve_pubkey,
        user_dest_liquidity,
        1_000_000, // 1 USDC (6 decimals)
    )?;

    // Build and send
    let message = Message::new(&instructions, Some(&owner));
    let recent_blockhash = rpc_client.get_latest_blockhash()?;
    let tx = Transaction::new(&[&signer], message, recent_blockhash);
    let signature = rpc_client.send_and_confirm_transaction(&tx)?;
    println!("Withdrawal successful! Signature: {signature}");
    ```
  </Tab>
</Tabs>

<Note>
  For the full withdraw example, including transaction sending and confirmation,
  check out [Withdraw Operations](/docs/build/developers/borrow/operations/withdraw).
</Note>

## Key Data Structures

<div class="constrain-data-structures-borrow">
  <Tabs>
    <Tab title="TypeScript">
      ##### Obligation

      ```typescript theme={null}
      class Obligation {
      	tag: BN;
      	lastUpdate: types.LastUpdate;
      	lendingMarket: Address;
      	owner: Address;
      	deposits: Array<types.ObligationCollateral>;
      	lowestReserveDepositLiquidationLtv: BN;
      	depositedValueSf: BN;
      	borrows: Array<types.ObligationLiquidity>;
      	borrowFactorAdjustedDebtValueSf: BN;
      	borrowedAssetsMarketValueSf: BN;
      	allowedBorrowValueSf: BN;
      	unhealthyBorrowValueSf: BN;
      	depositsAssetTiers: Array<number>;
      	borrowsAssetTiers: Array<number>;
      	elevationGroup: number;
      	numOfObsoleteDepositReserves: number;
      	hasDebt: number;
      	referrer: Address;
      	borrowingDisabled: number;
      	autodeleverageTargetLtvPct: number;
      	lowestReserveDepositMaxLtvPct: number;
      	numOfObsoleteBorrowReserves: number;
      	reserved: Array<number>;
      	highestBorrowFactorPct: BN;
      	autodeleverageMarginCallStartedTimestamp: BN;
      	orders: Array<types.ObligationOrder>;
      }
      ```

      {" "}

      <a href="https://github.com/Kamino-Finance/klend-sdk/blob/80f29fcda3ac954b400ceb3000999def487cff5c/src/%40codegen/klend/accounts/Obligation.ts#L145" target="_blank" rel="noopener noreferrer" class="github-link">
        <Icon icon="github" iconType="brands" size={16} />

        <span>View Full Typescript Obligation</span>
      </a>

      <Expandable title="Fields">
        | Field                                      | Type                                | Description                                                                                  |
        | ------------------------------------------ | ----------------------------------- | -------------------------------------------------------------------------------------------- |
        | `tag`                                      | `BN`                                | Version of the struct                                                                        |
        | `lastUpdate`                               | `types.LastUpdate`                  | Last update to collateral, liquidity, or their market values                                 |
        | `lendingMarket`                            | `Address`                           | Lending market address                                                                       |
        | `owner`                                    | `Address`                           | Owner authority which can borrow liquidity                                                   |
        | `deposits`                                 | `Array<types.ObligationCollateral>` | Deposited collateral for the obligation, unique by deposit reserve address                   |
        | `lowestReserveDepositLiquidationLtv`       | `BN`                                | Worst LTV for the collaterals backing the loan, represented as a percentage                  |
        | `depositedValueSf`                         | `BN`                                | Market value of deposits (scaled fraction)                                                   |
        | `borrows`                                  | `Array<types.ObligationLiquidity>`  | Borrowed liquidity for the obligation, unique by borrow reserve address                      |
        | `borrowFactorAdjustedDebtValueSf`          | `BN`                                | Risk adjusted market value of borrows/debt (scaled fraction)                                 |
        | `borrowedAssetsMarketValueSf`              | `BN`                                | Market value of borrows - used for max\_liquidatable\_borrowed\_amount (scaled fraction)     |
        | `allowedBorrowValueSf`                     | `BN`                                | The maximum borrow value at the weighted average loan to value ratio (scaled fraction)       |
        | `unhealthyBorrowValueSf`                   | `BN`                                | The dangerous borrow value at the weighted average liquidation threshold (scaled fraction)   |
        | `depositsAssetTiers`                       | `Array<number>`                     | The asset tier of the deposits                                                               |
        | `borrowsAssetTiers`                        | `Array<number>`                     | The asset tier of the borrows                                                                |
        | `elevationGroup`                           | `number`                            | The elevation group id the obligation opted into                                             |
        | `numOfObsoleteDepositReserves`             | `number`                            | The number of obsolete reserves the obligation has a deposit in                              |
        | `hasDebt`                                  | `number`                            | Marked = 1 if borrows array is not empty, 0 = borrows empty                                  |
        | `referrer`                                 | `Address`                           | Wallet address of the referrer                                                               |
        | `borrowingDisabled`                        | `number`                            | Marked = 1 if borrowing disabled, 0 = borrowing enabled                                      |
        | `autodeleverageTargetLtvPct`               | `number`                            | A target LTV set by the risk council when marking this obligation for deleveraging           |
        | `lowestReserveDepositMaxLtvPct`            | `number`                            | The lowest max LTV found amongst the collateral deposits                                     |
        | `numOfObsoleteBorrowReserves`              | `number`                            | The number of obsolete reserves the obligation has a borrow in                               |
        | `reserved`                                 | `Array<number>`                     | Reserved space for future use                                                                |
        | `highestBorrowFactorPct`                   | `BN`                                | The highest borrow factor percentage across all borrows                                      |
        | `autodeleverageMarginCallStartedTimestamp` | `BN`                                | Timestamp when risk council marked this obligation for deleveraging (zero if not applicable) |
        | `orders`                                   | `Array<types.ObligationOrder>`      | Owner-defined, liquidator-executed orders (e.g., stop-loss, take-profit)                     |
      </Expandable>
    </Tab>

    <Tab title="JSON">
      ##### Obligation

      ```json theme={null}
      {
        "tag": "0",
        "lastUpdate": {},
        "lendingMarket": "...",
        "owner": "...",
        "deposits": [],
        "lowestReserveDepositLiquidationLtv": "0",
        "depositedValueSf": "0",
        "borrows": [],
        "borrowFactorAdjustedDebtValueSf": "0",
        "borrowedAssetsMarketValueSf": "0",
        "allowedBorrowValueSf": "0",
        "unhealthyBorrowValueSf": "0",
        "depositsAssetTiers": [],
        "borrowsAssetTiers": [],
        "elevationGroup": 0,
        "numOfObsoleteDepositReserves": 0,
        "hasDebt": 0,
        "referrer": "...",
        "borrowingDisabled": 0,
        "autodeleverageTargetLtvPct": 0,
        "lowestReserveDepositMaxLtvPct": 0,
        "numOfObsoleteBorrowReserves": 0,
        "reserved": [],
        "highestBorrowFactorPct": "0",
        "autodeleverageMarginCallStartedTimestamp": "0",
        "orders": [],
        "padding3": []
      }
      ```

      <a href="https://github.com/Kamino-Finance/klend-sdk/blob/80f29fcda3ac954b400ceb3000999def487cff5c/src/%40codegen/klend/accounts/Obligation.ts#L81" target="_blank" rel="noopener noreferrer" class="github-link">
        <Icon icon="github" iconType="brands" size={16} />

        <span>View Full JSON Obligation</span>
      </a>

      <Expandable title="Fields">
        | Field                                      | Type     | Description                                                                                  |
        | ------------------------------------------ | -------- | -------------------------------------------------------------------------------------------- |
        | `tag`                                      | `string` | Version of the struct                                                                        |
        | `lastUpdate`                               | `object` | Last update to collateral, liquidity, or their market values                                 |
        | `lendingMarket`                            | `string` | Lending market address                                                                       |
        | `owner`                                    | `string` | Owner authority which can borrow liquidity                                                   |
        | `deposits`                                 | `array`  | Deposited collateral for the obligation, unique by deposit reserve address                   |
        | `lowestReserveDepositLiquidationLtv`       | `string` | Worst LTV for the collaterals backing the loan, represented as a percentage                  |
        | `depositedValueSf`                         | `string` | Market value of deposits (scaled fraction)                                                   |
        | `borrows`                                  | `array`  | Borrowed liquidity for the obligation, unique by borrow reserve address                      |
        | `borrowFactorAdjustedDebtValueSf`          | `string` | Risk adjusted market value of borrows/debt (scaled fraction)                                 |
        | `borrowedAssetsMarketValueSf`              | `string` | Market value of borrows - used for max\_liquidatable\_borrowed\_amount (scaled fraction)     |
        | `allowedBorrowValueSf`                     | `string` | The maximum borrow value at the weighted average loan to value ratio (scaled fraction)       |
        | `unhealthyBorrowValueSf`                   | `string` | The dangerous borrow value at the weighted average liquidation threshold (scaled fraction)   |
        | `depositsAssetTiers`                       | `array`  | The asset tier of the deposits                                                               |
        | `borrowsAssetTiers`                        | `array`  | The asset tier of the borrows                                                                |
        | `elevationGroup`                           | `number` | The elevation group id the obligation opted into                                             |
        | `numOfObsoleteDepositReserves`             | `number` | The number of obsolete reserves the obligation has a deposit in                              |
        | `hasDebt`                                  | `number` | Marked = 1 if borrows array is not empty, 0 = borrows empty                                  |
        | `referrer`                                 | `string` | Wallet address of the referrer                                                               |
        | `borrowingDisabled`                        | `number` | Marked = 1 if borrowing disabled, 0 = borrowing enabled                                      |
        | `autodeleverageTargetLtvPct`               | `number` | A target LTV set by the risk council when marking this obligation for deleveraging           |
        | `lowestReserveDepositMaxLtvPct`            | `number` | The lowest max LTV found amongst the collateral deposits                                     |
        | `numOfObsoleteBorrowReserves`              | `number` | The number of obsolete reserves the obligation has a borrow in                               |
        | `reserved`                                 | `array`  | Reserved space for future use                                                                |
        | `highestBorrowFactorPct`                   | `string` | The highest borrow factor percentage across all borrows                                      |
        | `autodeleverageMarginCallStartedTimestamp` | `string` | Timestamp when risk council marked this obligation for deleveraging (zero if not applicable) |
        | `orders`                                   | `array`  | Owner-defined, liquidator-executed orders (e.g., stop-loss, take-profit)                     |
      </Expandable>
    </Tab>

    <Tab title="Rust">
      ##### Obligation

      ```rust theme={null}
       pub struct Obligation {
          pub tag: u64
          pub last_update: LastUpdate
          pub lending_market: Pubkey
          pub owner: Pubkey
          pub deposits: [ObligationCollateral; 8]
          pub lowest_reserve_deposit_liquidation_ltv: u64
          pub deposited_value_sf: u128
          pub borrows: [ObligationLiquidity; 5]
          pub borrow_factor_adjusted_debt_value_sf: u128
          pub borrowed_assets_market_value_sf: u128
          pub allowed_borrow_value_sf: u128
          pub unhealthy_borrow_value_sf: u128
          pub deposits_asset_tiers: [u8; 8]
          pub borrows_asset_tiers: [u8; 5]
          pub elevation_group: u8
          pub num_of_obsolete_deposit_reserves: u8
          pub has_debt: u8
          pub referrer: Pubkey
          pub borrowing_disabled: u8
          pub autodeleverage_target_ltv_pct: u8
          pub lowest_reserve_deposit_max_ltv_pct: u8
          pub num_of_obsolete_borrow_reserves: u8
          pub reserved: [u8; 4]
          pub highest_borrow_factor_pct: u64
          pub autodeleverage_margin_call_started_timestamp: u64
          pub orders: [ObligationOrder; 2]
          pub padding_3: [u64; 93]
        }
      ```

      {" "}

      <a href="https://github.com/Kamino-Finance/klend/blob/5b37d7522aa070fad87f2fcf30bdf2e19d9e607a/programs/klend/src/state/obligation.rs#L23" target="_blank" rel="noopener noreferrer" class="github-link">
        <Icon icon="github" iconType="brands" size={16} />

        <span>View Full Rust Obligation</span>
      </a>

      <Expandable title="Fields">
        | Field                                      | Type     | Description                                                                                  |
        | ------------------------------------------ | -------- | -------------------------------------------------------------------------------------------- |
        | `tag`                                      | `string` | Version of the struct                                                                        |
        | `lastUpdate`                               | `object` | Last update to collateral, liquidity, or their market values                                 |
        | `lendingMarket`                            | `string` | Lending market address                                                                       |
        | `owner`                                    | `string` | Owner authority which can borrow liquidity                                                   |
        | `deposits`                                 | `array`  | Deposited collateral for the obligation, unique by deposit reserve address                   |
        | `lowestReserveDepositLiquidationLtv`       | `string` | Worst LTV for the collaterals backing the loan, represented as a percentage                  |
        | `depositedValueSf`                         | `string` | Market value of deposits (scaled fraction)                                                   |
        | `borrows`                                  | `array`  | Borrowed liquidity for the obligation, unique by borrow reserve address                      |
        | `borrowFactorAdjustedDebtValueSf`          | `string` | Risk adjusted market value of borrows/debt (scaled fraction)                                 |
        | `borrowedAssetsMarketValueSf`              | `string` | Market value of borrows - used for max\_liquidatable\_borrowed\_amount (scaled fraction)     |
        | `allowedBorrowValueSf`                     | `string` | The maximum borrow value at the weighted average loan to value ratio (scaled fraction)       |
        | `unhealthyBorrowValueSf`                   | `string` | The dangerous borrow value at the weighted average liquidation threshold (scaled fraction)   |
        | `depositsAssetTiers`                       | `array`  | The asset tier of the deposits                                                               |
        | `borrowsAssetTiers`                        | `array`  | The asset tier of the borrows                                                                |
        | `elevationGroup`                           | `number` | The elevation group id the obligation opted into                                             |
        | `numOfObsoleteDepositReserves`             | `number` | The number of obsolete reserves the obligation has a deposit in                              |
        | `hasDebt`                                  | `number` | Marked = 1 if borrows array is not empty, 0 = borrows empty                                  |
        | `referrer`                                 | `string` | Wallet address of the referrer                                                               |
        | `borrowingDisabled`                        | `number` | Marked = 1 if borrowing disabled, 0 = borrowing enabled                                      |
        | `autodeleverageTargetLtvPct`               | `number` | A target LTV set by the risk council when marking this obligation for deleveraging           |
        | `lowestReserveDepositMaxLtvPct`            | `number` | The lowest max LTV found amongst the collateral deposits                                     |
        | `numOfObsoleteBorrowReserves`              | `number` | The number of obsolete reserves the obligation has a borrow in                               |
        | `reserved`                                 | `array`  | Reserved space for future use                                                                |
        | `highestBorrowFactorPct`                   | `string` | The highest borrow factor percentage across all borrows                                      |
        | `autodeleverageMarginCallStartedTimestamp` | `string` | Timestamp when risk council marked this obligation for deleveraging (zero if not applicable) |
        | `orders`                                   | `array`  | Owner-defined, liquidator-executed orders (e.g., stop-loss, take-profit)                     |
      </Expandable>
    </Tab>
  </Tabs>
</div>

## Relevant Links

<CardGroup cols={2}>
  <Card title="Fetch Market Data via the API" icon="globe" href="https://api-docs.kamino.com/">
    Access market metrics and performance data through REST endpoints.
  </Card>

  <Card title="Smart contract repository" icon="github" href="https://github.com/Kamino-Finance/klend">
    Explore the on-chain program source code and documentation.
  </Card>

  <Card title="NPM SDK package" icon="npm" href="https://www.npmjs.com/package/@kamino-finance/klend-sdk">
    Install the TypeScript SDK to integrate borrowing and lending operations.
  </Card>

  <Card title="Rust Interface Crate" icon="rust" href="https://crates.io/crates/klend-interface">
    Lightweight Rust instruction builder for Kamino Lending operations.
  </Card>

  <Card title="More Borrow tutorials" icon="book" href="/docs/build/tutorials/borrow/index">
    Step-by-step guides for building with Kamino lending markets.
  </Card>
</CardGroup>
