Skip to Content
TutorialsHow to sell liquidity using Magma

How to sell liquidity using Magma

Interacting as a seller on Magma

1. Accept an Order

Authenticated Endpoint: requires an API key
⚠️

The order has to be in status WAITING_FOR_SELLER_APPROVAL

⚠️

The invoice needs to have an expiry of more than 48 hours.

Accept an order that is open for one of your offers.

mutation AcceptOrder($sellerAcceptOrderId: String!, $request: String!) { sellerAcceptOrder(id: $sellerAcceptOrderId, request: $request) } }

Click here to open the query in the Apollo Explorer.

Variables

{ "sellerAcceptOrderId": "ORDER_ID", "request": "BOLT11_LIGHTNING_REQUEST" }

2. Reject an Order

Authenticated Endpoint: requires an API key
⚠️

The order has to be in the WAITING_FOR_SELLER_APPROVAL status.

Reject an order that is open for one of your offers.

mutation SellerRejectOrder($sellerRejectOrderId: String!) { sellerRejectOrder(id: $sellerRejectOrderId) }

Click here to open the query in the Apollo Explorer

Variables

{ "sellerRejectOrderId": "ORDER_ID" }

3. Confirm Channel Opening

Authenticated Endpoint: requires an API key
⚠️

The order has to be in the WAITING_FOR_CHANNEL_OPEN status.

⚠️

The transaction has to include the output in this format TRANSACTION_ID:TRANSACTION_OUTPUT

Confirm a channel opening by sending us the opening transaction id.

mutation SellerAddTransaction( $sellerAddTransactionId: String! $transaction: String! ) { sellerAddTransaction(id: $sellerAddTransactionId, transaction: $transaction) }

Click here to open the query in the Apollo Explorer

Variables

{ "sellerAddTransactionId": "ORDER_ID", "transaction": "TRANSACTION_ID:TRANSACTION_OUTPUT" }
Last updated on