Synthetic USD
Get swaps
GET
/synthetic-usd/swapsPrivateGet your swaps between BTC and synthetic USD. Paginated, newest first.
Permissions: synthetic-usd:read
from?stringStart date, unix epoch 0 by default
Format
date-timeDefault
"1970-01-01T00:00:00.000Z"to?stringEnd date, default to current time
Format
date-timeDefault
"2026-11-09T17:08:56.659Z"limit?integerNumber of entries to return, default to 1000
Range
1 <= value <= 1000Default
1000cursor?stringCursor for pagination
Format
date-timeOK
application/json- response
data*array<>nextCursor*|Cursor to use for fetching the next page of results. Pass this value as the cursor parameter in the next request. Returns null when there are no more results.
import { createHttpClient } from '@ln-markets/sdk/rest/v3'
const client = createHttpClient({
key: 'your-key',
secret: 'your-secret',
passphrase: 'your-passphrase',
})
const result = await client.syntheticUsd.getSwaps({
from: '1970-01-01T00:00:00.000Z',
to: '2026-11-09T17:08:56.136Z',
limit: 500
}){
"data": [
{
"id": "7bcf37dd-289a-4779-ab02-64ead00c60fd",
"createdAt": "2024-05-08T02:40:00.000Z",
"inAsset": "BTC",
"outAsset": "USD",
"inAmount": 50000,
"outAmount": 4.99
}
],
"nextCursor": "2024-01-15T10:30:00.000Z"
}Get funding fees GET
Get the funding and quanto adjustment fees of your isolated trades, one row per trade and funding settlement: of every perpetual market, or of one market…
Create swap POST
Swap inAmount between your BTC and synthetic USD balances. BTC to USD swaps fill at the best bid, USD to BTC swaps at the best ask (see GET…