• Docs
  • API
  • Stream
  • LN Markets
REST API
Get account GETGet last unused on-chain address GETGenerate new Bitcoin address POSTGet notifications GETMark all notifications as read PUT
Account

Get account

REST API

LN Markets offers a REST API to integrate with your program or trading bot.

Get last unused on-chain address GET

Get the most recently generated, still unused on-chain address.

GET/accountPrivate

Get account information

Permissions: account:read

Response Body

OK

application/json
  1. response
  1. response
  2. …
username*string

Username of the user

Lengthlength <= 64
syntheticUsdBalance*number

Synthetic USD balance of the user (in dollars)

balance*number

Balance of the user

feeTier*integer

Fee tier of the user

Range-2147483648 <= value <= 2147483647
email*|

Email of the user

id*string

Unique identifier for this account

linkingPublicKey*|

Public key of the user

import { createHttpClient } from '@ln-markets/sdk/rest/v3'const client = createHttpClient({  key: 'your-key',  secret: 'your-secret',  passphrase: 'your-passphrase',})const result = await client.account.get()
{  "username": "satoshi",  "syntheticUsdBalance": 1337,  "balance": 69420,  "feeTier": 1,  "email": null,  "id": "1602a190-9dc0-48ff-9fb9-4b62f7270007",  "linkingPublicKey": "037b7c2587f823de3c62a639369b8c939bfb8f0bd40df58e9c1b6df63bcc88df4f"}