Amboss
Search…
πŸŒ‹
Magma
Documentation on how to use the Magma liquidity marketplace API

Create Offer

Authenticated Endpoint: requires an API key
Create an offer on Magma to sell channels
mutation CreateOffer($input: CreateOffer!) {
createOffer(input: $input)
}
Variables
{
"input": {
"base_fee": 10000, #fixed fee for opening a channel, denominated in sats.
"base_fee_cap": 10000, #promised upper limit for base fee channel settings.
"fee_rate": 10002,
"fee_rate_cap": 10003,
"max_size": 100000,
"min_block_length": 10005,
"min_size": 100000,
"total_size": 1000000
}
}

Get Your Offers

Authenticated Endpoint: requires an API key
Get all the offers associated with your account
query MyOffers {
getUserOffers {
list {
id
status
}
}
}

Enable/Disable an Offer

Authenticated Endpoint: requires an API key
Enable or disable an offer
mutation ToggleOffer($toggleOfferId: String!) {
toggleOffer(id: $toggleOfferId)
}
Variables
{
"toggleOfferId": "OFFER_ID"
}

Get Open Orders for your Offers

Authenticated Endpoint: requires an API key
Get all the orders that have been opened for your offers
query MyOfferOrders($getOfferOrdersId: String) {
getOfferOrders(id: $getOfferOrdersId) {
list {
status
id
seller_invoice_amount
}
}
}
Variables
{
"getOfferOrdersId": "ORDER_ID"
}