Socket
Socket
Sign inDemoInstall

LNMarkets

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

LNMarkets

LNMarkets API Wrapper


Maintainers
1

LNMarkets API Wrapper

This is a Python wrapper for LNMarkets API.

To install: pip install LNMarkets

Documentation: help(LNMarkets) To access documentation on idividual module, eg User: help(LNMarkets.User)

Example Usage:

import LNMarkets

LNMToken = '<YOUR TOKEN>'
apiState = LNMarkets.State.getState()
openPositions = LNMarkets.Positions.getPositions(LNMToken)['open'] #Token must have position scope
userInfo = LNMarkets.User.userInformation(LNMToken) #Token must have user scope
buyInfo = LNMarkets.Positions.buy(LNMToken,leverage,quantity=quantity)

Note:

  • It is recommended that you use token with only 'positions' scope, as leaking it cannot result in loss of funds through withdrawal.
  • Methods in Lnmarkets.User need token with 'user' scope.

Running Unit Tests

To run unit tests, run the following command in main directory, where setup.py is present.

$ python3 setup.py test --token '<Your Token>'

You need a token with both 'positions' and 'user' scope to run test. One of the test will buy and sell one contract, hence your account need small amount of balance.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc