---
title: "Sell ledger"
method: POST
path: "/markets/creditbook/sell"
tags: ["creditbook"]
---

# Sell ledger

`POST /markets/creditbook/sell`

Sells a loan ledger from one strategy into another strategy, using the expected sale price guard provided in the request.

## Headers

- `Idempotent-Key` string, nullable

## Request body

- TxnSellLedgerParams
  - `loan` string, required
  - `newStrategy` string, required
  - `oldStrategy` string, required
  - `sellParams` SellLedgerParamsSchema, required — Params for selling a ledger to a new lender/strategy (`sell_ledger`).
    - `assetIndexGuidance` integer[], required — Per-collateral oracle asset-index guidance.
    - `expectedSalePrice` integer, required — Sale price the seller expects, in the principal mint's native units.
    - `ledgerIndex` integer, required — Index of the ledger being sold.

## Response `200`

Serialized transaction for selling the targeted ledger.

- VersionedTransactionReturn — versioned txn return
  - `message` string, required — serialized message
  - `signatures` VersionedTransactionSignature[], required — serialized signatures
    - `publicKey` string, required — serialized message
    - `signature` string, required — serialized signatures

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `409` — Idempotency-Key reused with a different request body
- `500` — Internal server error

---

[API](https://skmtc.dev/loopscale/apis/loopscale-api.md) · [All operations](https://skmtc.dev/loopscale/apis/loopscale-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/loopscale/loopscale-api/revisions/531f64dbe09c/schema)
