-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Summary
When attempting to create an options trade via the Python SDK, the call to options_new_trade consistently returns:
{ "message": "Internal error", "code": "INTERNAL_SERVER_ERROR" }Other options endpoints (market, instruments, trades, volatility index, etc.) work fine.
Environment
- SDK: ln-markets Python SDK (latest from PyPI)
- Network: mainnet
- Python: 3.12.9
- OS: Pop OS 22.04
Steps to Reproduce
- Install the latest
ln-marketsPython SDK from PyPI. - Initialize the REST client on mainnet.
- Call
options_new_tradewith the parameters below.
Minimal Code Sample
from lnmarkets import Rest
lnm = Rest(
key="...",
secret="...",
passphrase="...",
network="mainnet",
)
resp = lnm.options_new_trade(
side="b",
quantity=1,
settlement="cash",
instrument_name="BTC.2025-12-26.50000.C",
)
print(resp)Request Payload
{
"side": "b",
"quantity": 1,
"settlement": "cash",
"instrument_name": "BTC.2025-12-26.50000.C"
}Expected Behavior
Trade should be created successfully (or a clear validation error should be returned if the payload is invalid).
Actual Behavior
{
"message": "Internal error",
"code": "INTERNAL_SERVER_ERROR"
}What I’ve Tried
- Confirmed
instrumentNameuses camelCase. - Verified
options_get_marketreportsactive: true. - Verified the instrument exists via
options_get_instruments. - Tried several instruments from the returned list.
- Other options endpoints (get market, get instruments, my trades, volatility index) all work.
Notes
- Using the smallest possible
quantityandcashsettlement to be safe. - This looks like either an API-side issue or an undocumented requirement for
options_new_trade.
Workarounds
None found.
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels