Browse Source
# Conflicts: # .gitignore # iguana/exchanges/LP_commands.c # iguana/exchanges/LP_include.h # iguana/exchanges/LP_nativeDEX.c # iguana/exchanges/LP_ordermatch.c # iguana/exchanges/LP_prices.c # iguana/exchanges/LP_socket.c # iguana/exchanges/LP_swap.c # iguana/exchanges/coins # iguana/exchanges/mm.cpatch-3
jl777
7 years ago
31 changed files with 413 additions and 188 deletions
Binary file not shown.
@ -1,7 +1,17 @@ |
|||
@echo off |
|||
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":null,\"method\":\"enable\",\"coin\":\" \"}" -s > userpass.json |
|||
for /f "tokens=2 delims=:," %%a in (' find "userpass" "userpass.json" ') do ( |
|||
rem first time call to any method after started markemaker will return default userpass 1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f |
|||
rem by-default userpass is 1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f from "default" passphrase |
|||
|
|||
rem first time call to marketmaker don't return anything now, so we disable it |
|||
rem curl --url "http://127.0.0.1:7783" --data "{\"userpass\":null,\"method\":\"enable\",\"coin\":\"\"}" -s > default_userpass.json |
|||
rem curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f\",\"method\":\"hello\"}" -s > default_userpass.json |
|||
|
|||
rem echo - First time call to MM API finished, default userpass received |
|||
set /p PASSPHRASE=<passphrase |
|||
echo - Pushing passphrase to login |
|||
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f\",\"method\":\"passphrase\",\"passphrase\":\"%PASSPHRASE%\",\"gui\":\"nogui\"}" -s > userpass.json |
|||
echo Getting userpass related to your passphrase finished |
|||
for /f "tokens=4 delims=:," %%a in (' find "userpass" "userpass.json" ') do ( |
|||
echo UserPass: %%~a |
|||
echo %%~a > userpass |
|||
) |
|||
del userpass.json |
@ -1,2 +1,2 @@ |
|||
source userpass |
|||
curl --url "http://127.0.0.1:7783" --data "{\"minprice\":0.00002,\"maxprice\":0.0001,\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"CHIPS\",\"rel\":\"BTC\",\"margin\":0.05,\"refbase\":\"chips\",\"refrel\":\"coinmarketcap\"}" |
|||
curl --url "http://127.0.0.1:7783" --data "{\"minprice\":0.0001,\"maxprice\":0.0002,\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"CHIPS\",\"rel\":\"BTC\",\"margin\":0.05,\"refbase\":\"chips\",\"refrel\":\"coinmarketcap\"}" |
|||
|
@ -1,2 +1,2 @@ |
|||
source userpass |
|||
curl --url "http://127.0.0.1:7783" --data "{\"minprice\":0.04,\"maxprice\":0.1,\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"CHIPS\",\"rel\":\"KMD\",\"margin\":0.05,\"refbase\":\"chips\",\"refrel\":\"coinmarketcap\"}" |
|||
curl --url "http://127.0.0.1:7783" --data "{\"minprice\":0.2,\"maxprice\":0.4,\"userpass\":\"$userpass\",\"method\":\"autoprice\",\"base\":\"CHIPS\",\"rel\":\"KMD\",\"margin\":0.05,\"refbase\":\"chips\",\"refrel\":\"coinmarketcap\"}" |
|||
|
@ -0,0 +1,3 @@ |
|||
#!/bin/bash |
|||
source userpass |
|||
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"calcaddress\",\"passphrase\":\"default\"}" |
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@ |
|||
#!/bin/bash |
|||
source userpass |
|||
# this will only work for watchonly addresses that have been rescanned and with active coins |
|||
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"fundvalue\",\"address\":\"RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC\",\"holdings\":[{\"coin\":\"iota\",\"balance\":1500000}, {\"coin\":\"bitcoin-cash\",\"balance\":1200}, {\"coin\":\"bitcoin\",\"balance\":145}],\"divisor\":1400000}" |
|||
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"fundvalue\",\"address\":\"RTu3JZZKLJTcfNwBa19dWRagEfQq49STqC\",\"holdings\":[{\"coin\":\"iota\",\"balance\":1500000}, {\"coin\":\"bitcoin-cash\",\"balance\":1200}, {\"coin\":\"bitcoin\",\"balance\":137}, {\"coin\":\"chips\",\"balance\":100000}],\"divisor\":1400000}" |
|||
|
@ -1,3 +1,3 @@ |
|||
coin=BET |
|||
price=0.0005 |
|||
invprice=2000 |
|||
price=0.00075 |
|||
invprice=1333.33 |
|||
|
@ -0,0 +1,89 @@ |
|||
@echo off |
|||
rem [ Decker] Automatically download and build depends script for marketmaker. |
|||
rem |
|||
rem 1. Requires installed CMake for Windows (!) |
|||
rem 2. Currently build only 64-bit release versions of .lib and .dll |
|||
rem 3. Libraries available: pthreads, nanomsg, curl |
|||
|
|||
@REM Check for Visual Studio |
|||
call set "VSPATH=" |
|||
if defined VS140COMNTOOLS ( if not defined VSPATH ( |
|||
call set "VSPATH=%%VS140COMNTOOLS%%" |
|||
) ) |
|||
|
|||
@REM check if we already have the tools in the environment |
|||
if exist "%VCINSTALLDIR%" ( |
|||
goto compile |
|||
) |
|||
|
|||
if not defined VSPATH ( |
|||
echo You need Microsoft Visual Studio 15 installed |
|||
pause |
|||
exit |
|||
) |
|||
|
|||
@REM set up the environment |
|||
if exist "%VSPATH%..\..\vc\vcvarsall.bat" ( |
|||
call "%%VSPATH%%..\..\vc\vcvarsall.bat" amd64 |
|||
goto compile |
|||
) |
|||
|
|||
echo Unable to set up the environment |
|||
pause |
|||
exit |
|||
|
|||
:compile |
|||
rem MSBuild /help |
|||
echo. |
|||
echo Decker will automatically download and build all needed *.dll and *.lib for you ;) |
|||
timeout /t 5 /nobreak |
|||
|
|||
mkdir marketmaker_depends |
|||
mkdir x64\Release |
|||
|
|||
rem --- pthreads --- |
|||
:compile_pthreads |
|||
cd marketmaker_depends |
|||
git clone https://github.com/DeckerSU/pthread-win32 |
|||
cd pthread-win32 |
|||
MSBuild pthread.2015.sln /t:Rebuild /p:Configuration=Release /p:Platform=Win32 |
|||
MSBuild pthread.2015.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 |
|||
cd ../.. |
|||
copy marketmaker_depends\pthread-win32\bin\x64_MSVC2015.Release\pthread_lib.lib OSlibs\win\x64\pthread_lib.lib |
|||
|
|||
rem --- nanomsg --- |
|||
:compile_nanomsg |
|||
|
|||
cd marketmaker_depends |
|||
git clone https://github.com/nanomsg/nanomsg |
|||
cd nanomsg |
|||
mkdir build_msvc_2015_win32 |
|||
mkdir build_msvc_2015_win64 |
|||
cd build_msvc_2015_win64 |
|||
cmake -G "Visual Studio 14 2015 Win64" .. |
|||
cmake --build . --config Release --target nanomsg |
|||
cd ../../.. |
|||
copy marketmaker_depends\nanomsg\build_msvc_2015_win64\Release\nanomsg.lib OSlibs\win\x64\release\nanomsg.lib |
|||
copy marketmaker_depends\nanomsg\build_msvc_2015_win64\Release\nanomsg.exp OSlibs\win\x64\release\nanomsg.exp |
|||
copy marketmaker_depends\nanomsg\build_msvc_2015_win64\Release\nanomsg.dll x64\Release\nanomsg.dll |
|||
|
|||
rem --- curl --- |
|||
:compile_curl |
|||
cd marketmaker_depends |
|||
git clone https://github.com/curl/curl |
|||
cd curl |
|||
mkdir build_msvc_2015_win32 |
|||
mkdir build_msvc_2015_win64 |
|||
cd build_msvc_2015_win64 |
|||
cmake -G "Visual Studio 14 2015 Win64" .. |
|||
cmake --build . --config Release --target libcurl |
|||
|
|||
rem cmake .. -G"Visual Studio 14 2015 Win64" -DCURL_STATICLIB=ON -DCURL_DISABLE_LDAP=ON -DCURL_STATIC_CRT=ON |
|||
rem cmake .. -G"Visual Studio 14 2015 Win64" -DCURL_STATICLIB:BOOL=ON -DCURL_STATIC_CRT:BOOL=ON -DHTTP_ONLY:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=RELEASE .. |
|||
rem cmake --build . --config Release |
|||
rem cmake --build . --config Release --target libcurl |
|||
|
|||
cd ../../.. |
|||
copy marketmaker_depends\curl\build_msvc_2015_win64\lib\Release\libcurl_imp.lib OSlibs\win\x64\release\libcurl.lib |
|||
copy marketmaker_depends\curl\build_msvc_2015_win64\lib\Release\libcurl_imp.exp OSlibs\win\x64\release\libcurl.exp |
|||
copy marketmaker_depends\curl\build_msvc_2015_win64\lib\Release\libcurl.dll x64\Release\libcurl.dll |
Loading…
Reference in new issue