shellscript for interacting with lnmarkets.com

Overview

shell-trader CLI

for lnmarkets and maybe more exchanges

shellscript for interacting with lnmarkets

todo

maybe do a ftx, if some1 is interested

setup

clone the repository

 git clone https://github.com/dni/shell-trader

setup lnmarkets CLI

make the script executable

  sudo chmod +x ~/repos/trading/shell-trader/lnm.sh

symlink the script to /usr/bin

  sudo ln -s ~/repos/trading/shell-trader/lnm.sh /usr/bin/lnm

setting up the enviroment variable

  cd ~/repos/trading/shell-trader
  mv .env.lnm.example .env.lnm
  $EDITOR .env.lnm

usage

buy_limit / sell_limit

  • required arguments: $qty, $leverage, $price
  • optional arguments: $stoploss, $takeprofit
  lnm sell_limit $qty $leverage $price $stoploss $takeprofit

buy_market / sell_market

  • required arguments: $qty, $leverage
  • optional arguments: $stoploss, $takeprofit
  lnm buy_market $qty $leverage $stoploss $takeprofit

positions

  lnm positions
  lnm positions open

add_margin / take_profit

  lnm add_margin $pid $amount
  lnm take_profit $pid $amount

close/ cancel

  lnm close $pid
  lnm cancel $pid

close_all / cancel_all

  lnm close_all
  lnm cancel_all

ticker / index_history

  lnm ticker
  lnm index_history

user / balance

  lnm user
  lnm balance
You might also like...

Framework for interacting with instagrams private api in a usable manner (forked from andre's work and improved and fixed)

node-ig-framework Framework for interacting with instagrams private api in a usable manner (forked from andre's work and improved and fixed) Installat

Dec 31, 2022

A Deno library for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻

A Deno library for interacting with the mouse 🖱️ keyboard ⌨️ and screen 💻 . Litebot provides a simple API for creating kbm events, macros, & working with displays. Litebot leverages Deno's FFI to allow speedy low level control in C & C++ while having a typescript API exposed to the user.

Aug 30, 2022

starter kit for interacting with zora api, protocol, and creator toolkit

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Oct 20, 2022

❇️ Doxor.js : more comfortable interacting with IndexedDB

doxor.js Offline database in Front-End library for interacting with IndexedDB Install Doxor.js using npm npm i doxor.js Creating a database import Do

Oct 3, 2022

JavaScript library for parsing Dirtywave M8 files, complete with a CLI for interacting with M8 files.

m8-js This repository contains a JavaScript library for parsing Dirtywave M8 files, as well as a CLI for interacting with M8 files. The hopes are not

Dec 17, 2022

An overly simplified Angular tool for interacting with Smart Contracts, demod at ng-conf 2022.

AngularOperator This is a sample repo and tool created for ng-conf 2022. It contains a normal Angular app designed to interact with the blockchain. It

Oct 7, 2022

An AWS Cloud Native application using CDK that defines a Serverless Event Driven application for interacting with Twitter and utilising Machine Learning / AI as a Service.

An AWS Cloud Native application using CDK that defines a Serverless Event Driven application for interacting with Twitter and utilising Machine Learning / AI as a Service.

AWS Serverless Event Driven Twitter Bot An AWS Cloud Native application using CDK (Written in TypeScript) that defines a Serverless Event Driven appli

Dec 18, 2022

Boilerplate starter template for a new Telegram Web App (TWA) interacting with the TON blockchain

Boilerplate starter template for a new Telegram Web App (TWA) interacting with the TON blockchain

TON Starter Template - Telegram Web App (TWA) Starter template for a new TWA interacting with the TON blockchain Overview This project is part of a se

Dec 17, 2022

A front end GUI for interacting with the Stable Horde / Stable Diffusion distributed cluster

A front end GUI for interacting with the Stable Horde / Stable Diffusion distributed cluster

ArtBot for Stable Diffusion See it in action: https://tinybots.net/artbot ArtBot is a front-end GUI for generating images and photos with Stable Diffu

Jan 2, 2023

Type safe library for interacting with Mindbody's Public API (v6) and Webhooks

Mindbody API Type safe library for interacting with Mindbody's Public API (v6) and Webhooks ⚠️ Read before installing This library is typed according

Dec 9, 2022
Comments
  • Take profit script

    Take profit script

    I've created a script (in fish shell) that helps me to monitor my open positions and close all positions when profit margin is hit.

    Currently take profit is 20% of the total running margin in use.

    #!/bin/fish

    while true ; # Calculate the total profit of all positions set LNM_PROFIT (lnm positions | grep \"pl\" | sed "s/\,//" | awk '{s+=$2} END {print s}'); # Obtain total running margin set LNM_MARGIN (lnm user | grep total_running_margin | awk {'print $2'} | sed "s/\,//"); set LNM_PROFIT_TARGET (math $LNM_MARGIN \* 0.20); # Print profit, margin and take profit target echo Profit = $LNM_PROFIT Margin = $LNM_MARGIN TP = $LNM_PROFIT_TARGET; # If profit target reached close all positions if test $LNM_PROFIT -gt $LNM_PROFIT_TARGET echo "Taking profit ~ $LNM_PROFIT" lnm close_all end # When profit is 80% or more we monitor more closely if test $LNM_PROFIT -gt (math $LNM_PROFIT_TARGET \* 0.80) sleep 3 else sleep 10 end end

    opened by jase100k 1
Owner
Daniel Krahofer
Daniel Krahofer
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Vuejs 2 components for interacting with mapbox-gl-js

VueMapbox Combine powers of Vue.js and Mapbox Gl JS Vue-mapbox is wrapper around Mapbox GL JS library that provides vueish-way to interact with the ma

Alex 425 Dec 26, 2022
JavaScript API based capstone project using TVmaze API for displaying and interacting with items from the data base.

Yuriy Chamkoriyski & Bonke Gcobo Javascript capstone project API-based webapp from Module 2 at Microverse Wireframe requirements The Home Page low fid

Yuriy Chamkoriyski 5 May 30, 2022
⚔️ Peripheral contracts for interacting with Saber.

saber-periphery Peripheral contracts for interacting with Saber. Programs Package Description Version Docs add-decimals Wraps another token to give it

Saber 22 Dec 12, 2022
Library for interacting with RMM protocol through ethers.js.

?? rmm-ethers Easily connect and transact with RMM protocol. ?? Features ?? Deploy RMM protocol ⚡️ Easily connect to an RMM deployment ?? Create RMM p

Primitive 14 Nov 13, 2022
💻 ssher.vim is interacting remote machines(only linux) through ssh connection

?? ssher.vim is interacting remote machines(only linux) through ssh connection

Luma 3 Feb 21, 2022
📡Usagi-http-interaction: A library for interacting with Http Interaction API

?? - A library for interacting with Http Interaction API (API for receiving interactions.)

Rabbit House Corp 3 Oct 24, 2022
Compact library for interacting with Ankr Scan Multichain API.

ankrscan.js Compact SDK for interacting with Ankr Scan MultiChain JSON-RPC API. SDK supports following MultiChain methods: getLogs - logs matching the

Ankr 23 Jan 3, 2023