3s3s / opentrade

OpenTrade - Open Source Cryptocurrency Exchange
MIT License
399 stars 401 forks source link

Trade Pairs #10

Open charnasol opened 6 years ago

charnasol commented 6 years ago

Hi

This is missing from set up/install and would be great to be able to add them without custom coding it. Thanks

tzman89 commented 6 years ago

@jonasess you have a blank space betwen ip and port 199.87.90.15 :7332 199.87.90.15:7332

If you are using remote server for deamon in btcatom.conf you need to include rpcallowip=YOUREXCHANGESERVERIP If you are using it on localhost then RPC address needs to be 127.0.0.1:7332

Also check if your deamon is really started, usually you start it with "bitcoind" command but you will have another command with d (atomd or something like this) for your coin

About Error: listen EADDRINUSE :::40080 , as I understand you dont need 40080 port at all, use it on 40443

jonasess commented 6 years ago

Thanks it's working now

jonasess commented 6 years ago

Guys anyone has any idea about this problem I have a server was running another board using nginx configuration . So i shut down nginx which mean that board will be off I set up open trade board, i changed the prot to 443 so the open trade board will run on domain name then i run this command line (sudo -b node main.js) ti make open trade running in the background of the server and available all the time But the problem is after a limited time 1 or 2 hours the processes of main.js die . Is there any solution for that?

charnasol commented 6 years ago

@tzman89 since we are setting up our own boards, are they configured with a local wallet for commission or do we have to input that?

jonasess commented 6 years ago

Also is there anyway to change or add more VS coin? because it's only exchange with MC coin Where i can add or change? in which files i should look up for?

tzman89 commented 6 years ago

Just to clarify something, I saw this script 2 days ago and I went trought code.All I learned about opentrade is from the last 2 days which means stuff I say doesn't mean is true.I just want to help.

@jonasess Don't run it in the background, install screen and you can manage it in more windows. With this you can close your terminal and it will still run, when you are back you just write screen -r and you are back into your windows where it's running.

@charnasol It's automated commision and it's done by database.Main wallet is doing everything and it's only wallet and commisions are whats left in main wallet after all users withdraw their coins.

@jonasess Yes you can easly change it by changing config in constants.js (just change from MC to Bitcoin or any coin you want) but as I can see there is not option to add more than one coin pair for now.

jonasess commented 6 years ago

@tzman89 i used forever to run it and regarding changing the cased coin , i did it yesterday i just changed to bitcoin (btc) but does it means it will run automatically? or it needs more configurations?

tzman89 commented 6 years ago

It will run automaticly, just be sure you have added Bitcoin and not bitcoin (capital B).If you can see balance bitcoin in buy order box then it's working.Also on market you won't have BTC since its now pair for all other coins

jonasess commented 6 years ago

Okay thank you

tzman89 commented 6 years ago

it will be like this

untitled

jonasess commented 6 years ago

@tzman89 in constant.js i changed these two lines exports.TRADE_MAIN_COIN = "Bitcoin"; exports.TRADE_MAIN_COIN_TICKER = "BTC"; But no changes yet . It doesn't show up in market Also in admin aria / coin i added bitcoin there and tested it using RPC and it's working But still does't show on the title of market

tzman89 commented 6 years ago

It will not show on the title, on the picture I changed it by myself in the code You need to add one more coin and that coin will show in market, after clicking on it you will have an option to buy sell order Bitcoin won't show on market because it's main coin and its included in all pairs

jonasess commented 6 years ago

@tzman89 does it means i don't have to set up the bitcoin daemon? and link it with RPC in admin->coin aria or i have to do that but make the bitcoin invisible . like not showing it? Because making it invisible means the users will not get BTC wallet addresses .

tzman89 commented 6 years ago

When you setup your deamon and add Bitcoin to admin panel, bitcoin wont show in market if it's added as main pair

jonasess commented 6 years ago

@tzman89 Okay i got you thanks for the help

vitorgamer58 commented 6 years ago

@3s3s Would you have any tips on what file I should modify so opentrade would become compatible with cryptonight coins?

jonasess commented 6 years ago

@vitorgamer58 i added cryptonote (Galaxycash ... etc) successfully on the board like any other coin (btc ... etc). Did you try to add it first?

tzman89 commented 6 years ago

@jonasess GalaxyCash is bitcoin based coin with rpc 1.0 Try to add monero or bytecoin and you will see that this wont work.Cryptonote coins have different rpc commands and wont work with this script.

@vitorgamer58 You will need to change alot of files if you want to add cryptonote

charnasol commented 6 years ago

@tzman89 what files as it would be worth it. Also how to change to make sure you can add tokens from ethereum and stellar and multichain...

jonasess commented 6 years ago

@tzman89 okay i got you. Is there any simple code on js on how to send RPC request and get the results? Like send request to server which running the daemon to get new wallet address, balance ... etc? since am new in rpc i would like to see some examples.

tzman89 commented 6 years ago

@charnasol You will need one more rpc file,wallet file, new database fields with identification for all coins. Wallet is the main in whole script, when you deposit coins those will be the same as all other on the trading page.So you need to make new wallet.js and rpc.js file and recode some of the other files, in wallet there are stored rpc commands and wallet is comunicating with rpc file.Check those 2 files and you will know what to do.

ERC20 is whole another story and I'm not very familiar with it.It's comunicating with external wallets and commands.

@jonasess There is no simple code, for any other coin which is not based on bitcoin you'll need to do a lot of programming.Not all coins work with RPC, crpytonote is one which works but have different commands for get address and send coins

vitorgamer58 commented 6 years ago

@jonasess yes, I tried and got an error already documented above, probably cryptonote support has been added since the version I tried.

Headers: {"access-control-allow-origin":"*","content-length":"86","server":"CryptoNote-based HTTP server"}
rpcPostJSON: result:false (message: Method not found<br> )
Status: 200
Headers: {"content-length":"86","server":"CryptoNote-based HTTP server"}
rpcPostJSON: result:false (message: Method not found<br> )
rpcPostJSON {"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["921eae7cb1d954364dcead329cf2e983",0] }
rpcPostJSON {"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["921eae7cb1d954364dcead329cf2e983",0] }
Status: 200
Headers: {"access-control-allow-origin":"*","content-length":"84","server":"CryptoNote-based HTTP server"}
rpcPostJSON: result:success (message:  )
Status: 200
Headers: {"content-length":"99","server":"CryptoNote-based HTTP server"}
rpcPostJSON: result:success (message:  )
jonasess commented 6 years ago

@tzman89 Am not asking for other coin am asking for a simple code for a bitcoin, how to connect to daemon get an address and balance ...etc . i just need a simple code if it's available for bitcoin to understand rpc more.

jonasess commented 6 years ago

@vitorgamer58 True it's not supported . does it mean you have to add more codes or just simple changes to be supported?

vitorgamer58 commented 6 years ago

I have no idea but I will never know if I do not try

vitorgamer58 commented 6 years ago

But if it is not supported how did you add a cryptonote?

jonasess commented 6 years ago

i found what i was looking for on how to connect to daemon using rpc you can send this curl request curl --user username:password --data-binary '{"jsonrpc": "1", "id":"", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain' http://localhost:8332/

jonasess commented 6 years ago

Also can you guys tell me or direct me where i can find the other method to communicate with daemon? there's getblockchaininfo, getbalance . what's the other methods? and what's their parameters? For example getbalance what's it's parameters to get the balance of specific address ... etc

jonasess commented 6 years ago

I found here all the methods https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list getnewaddress for getting new bitcoin wallet . but how to get it's passphrase? I think it's needed to send money

tzman89 commented 6 years ago

bitcoin-cli encrypwallet yourpassword password you put will be your passphrase You can get all commands by typing bitcoin-cli help

jonasess commented 6 years ago

@tzman89 encryptwallet "passphrase" does this command line apply on all addresses generated by the daemon? because it doesn't give an option to generate passphrase for ever address you generate. Also is you used dumpprivkey it shows every address it's secrete key . where exactly you can use that secret key, because from what i see in transaction (exchange) you just need the address from both wallets not the secrete key. Btw the dumpprivkey works with other daemons like bitcoin atom and galaxycash but it didn't work with bitcoin daemon as it asks for the passphrase of the address . which you don't get when you use getnewaddress to generate new one.

mochfauz commented 6 years ago

image I got this error. auu

morawskiwincenty9 commented 5 years ago

mx resolved: [ { exchange: 'mx01.mail.com', priority: 10 }, { exchange: 'mx00.mail.com', priority: 10 } ] MX connection created: mx01.mail.com recv email.com>554-mail.com (mxgmxus001) Nemesis ESMTP Service not available recv email.com>554-No SMTP service recv email.com>554 invalid DNS PTR resource record, IP=56.101.50.77 SMTP responds error code 554 Error with your mail server: SMTP code:554 msg:554-mail.com (mxgmxus001) Nemesis ESMTP Service not available 554-No SMTP service 554 invalid DNS PTR resource record, IP=56.101.50.77