3s3s / opentrade

OpenTrade - Open Source Cryptocurrency Exchange
MIT License
399 stars 400 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

3s3s commented 6 years ago

Readme updated. Try it now

vitorgamer58 commented 6 years ago

Alt I found this piece of code that seems to say something about adding a coin, maybe it has an admin panel where it's easy to add and remove coins.

opentrade/server/modules/admin/coins.js

3s3s commented 6 years ago

The first registered user have access to admin panel where it is possible to add coins. Please read new readme file

vitorgamer58 commented 6 years ago

the new readme? ok, I did a pull request on Branch Test updating the redme for a dependency that was missing.

3s3s commented 6 years ago

I took your changes into account.

vitorgamer58 commented 6 years ago

is it giving a mistake when I register, apparently the exchange can not send email, could I get the file where I can configure the sending of smtp mail? I searched the code and did not find it. thank you.

3s3s commented 6 years ago

You can change this constants https://github.com/3s3s/opentrade/blob/master/server/constants.js#L10 Mail content can be changed here https://github.com/3s3s/opentrade/blob/master/server/modules/mailer.js

vitorgamer58 commented 6 years ago

I still think something is missing, for example, the source email password, how will the exchange send email without the source email password?

I am having problems in the registration area because no email is sent, it gives error.

3s3s commented 6 years ago

smtp protocol does not require passwords. You should send email from your own domain (not from gmail) This is you error: exports.NOREPLY_EMAIL = "vitorgamer58@gmail.com"

3s3s commented 6 years ago

You need to register domain and A-record for your domain should point to your IP address (address from where you will send emails)

vitorgamer58 commented 6 years ago

I created a .tk domain and did DNS right, I changed it to vitorgamer58@bolsotrade.tk and I restarted the exchange, so I'm getting the same error

error on connectMx Error: can not connect to any SMTP server

but something that is very confusing for me is that I made the change you said and when I try to register with the email of the outlook he gives it.

Error on connectMx for:  { exchange: 'outlook-com.olc.protection.outlook.com',
  priority: 5 } { Error: connect ETIMEDOUT 104.47.5.33:25
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
  code: 'ETIMEDOUT',
  errno: 'ETIMEDOUT',
  syscall: 'connect',
  address: '104.47.5.33',
  port: 25 }

and when I try with my Gmail email

Error on connectMx for:  { exchange: 'alt4.gmail-smtp-in.l.google.com', priority: 40 } { Error: connect ETIMEDOUT 108.177.14.26:25
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
  code: 'ETIMEDOUT',
  errno: 'ETIMEDOUT',
  syscall: 'connect',
  address: '108.177.14.26',
  port: 25 }

If you want to look at my site https://bolsotrade.tk:40443

3s3s commented 6 years ago

Seems problem in your vps hosting provider. Some providers are blocks outgoing smtp traffic to port 25.

vitorgamer58 commented 6 years ago

you are having a great patience with me in, kkkkkk, sometimes it seems so simple, as I did not succeed tried in my vps of the vultr, without success, did what you spoke with the domain and without success, read in an article that vultr blocks port 25 by default, I'm having to send a ticket and ask for the release.

jonasess commented 6 years ago

Hello .i have problem in recaptcha i added the private key of recaptcha to private_contacts.js but whenever i run the board and try to log in it shows that there's an error in recaptcha I tried many keys but non of them worked . any solution for this?

jonasess commented 6 years ago

Whenever am trying to regester a new account i get Bad Request Something wrong ((

3s3s commented 6 years ago

you need to setup recaptcha. Without it exchange will not work.

charnasol commented 6 years ago

He is trying to finish setting up opentrade for our exchange. If you can assist him with whatever recaptcha error he is getting, we can finish

jonasess commented 6 years ago

the recaptcha doesn't work at all . as i said i tried many secret key of google recaptcha but still am getting same issues

jonasess commented 6 years ago

recaptcha problem solved

vitorgamer58 commented 6 years ago

All right, I was able to set up, but I got an error trying to add a coin. alt

jonasess commented 6 years ago

Anyone have an idea on which file i have to deal with to change the open trade to a domain name instead of ip address and port?

vitorgamer58 commented 6 years ago

yes, to change the port you must edit the file constans.js on line 16, to use a domain name just buy a domain. I used a .tk domain that is free, just point the domain to the IP of your VPS or configure the DNS https://github.com/3s3s/opentrade/blob/master/server/constants.js#L16

jonasess commented 6 years ago

I already have a domain name and it's pointed to another website (board) . i want to switch . instead of pointing the domain name on that board i want to point it on opentrade . in other side i will move the other board on the port 4440 .

vitorgamer58 commented 6 years ago

I think the entire domain has to point to the VPS where opentrade will stay, try to ping my vps: bolsotrade.tk

jonasess commented 6 years ago

i found the configuration file . the server was configured using nginx

vitorgamer58 commented 6 years ago

I confess that I am not very good with configuration of this type, but the opentrade works independently of the NGIX or Apache

jonasess commented 6 years ago

nginx is used for configuration of server to point the domain name on the website . so when you type www.example.com . that website appears . after installing opentrade . to access to opentrade instead of typing www.example.com you have to type www.exampe.com:40443 so with port you access to open trade without port you access to the other website . am trying to take that website down and replace it with opentrade . so whenever you type www.exaple.com opentrade will appear . The previos dev who set up the website used nginx to point the server to that website.

vitorgamer58 commented 6 years ago

does not need much, just uninstall ngix, configure the opentrade port to 443 and get some way to http://yourdomain.com be redirected to https://yourdomain.com because when you put port 443 and enter via https there is no need to put yourdomain: 443 is the same as http with port 80

vitorgamer58 commented 6 years ago

Add coin erro

INSERT INTO sessions VALUES  ('+n68Dllx8Qt6deayjqEjK/19gfZN6n0DDy/vDO5EsW0%3D', '1521829066500', '1')
UPDATE sessions SET time='1521829066503' WHERE token='+n68Dllx8Qt6deayjqEjK/19gfZN6n0DDy/vDO5EsW0%3D'
INSERT error: SQLITE_CONSTRAINT: UNIQUE constraint failed: sessions.token
jonasess commented 6 years ago

done it worked thanks

jonasess commented 6 years ago

what does RPC means? RPC address ,RPC user,RPC password?

3s3s commented 6 years ago

If coins not added, try change this code https://github.com/3s3s/opentrade/blob/master/static_pages/js/utils.js#L96

change socket = new WebSocket("wss://"+window.location.host+ ":40443");

to socket = new WebSocket("wss://"+window.location.hostname+ ":40443");

where port (40443) should be same as in this string https://github.com/3s3s/opentrade/blob/master/server/constants.js#L16

vitorgamer58 commented 6 years ago

lets go

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:  )

I was able to add the coins, but I could not make a deposit because the address is not generated.

3s3s commented 6 years ago

I am afraid CryptoNote RPC is not compatible with Bitcoin RPC. Currently OpenTrade support only Bitcoin forks that have compatibility with Bitcoin RPC https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

jonasess commented 6 years ago

Guys what does RPC means? and using RCP means we don't need daemon of the coin?

3s3s commented 6 years ago

RPC is "Remote Procedure Calls" Daemons have in-build RPC. About Bitcoin RPC you can read here: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) and here https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

jonasess commented 6 years ago

Thanks i will check it

charnasol commented 6 years ago

Are the rpc username and pass actually needed for all? And we will do the code in to make sure any tokens and cryptonote will work also.

3s3s commented 6 years ago

There is strongly recommended to use rpc password for security reasons

charnasol commented 6 years ago

But not needed to list coins or add markets.

vitorgamer58 commented 6 years ago

putz, my goal would be to only add cryptonight coins ..

vitorgamer58 commented 6 years ago

putz, my goal would be to only add cryptonight coins ..

jonasess commented 6 years ago

Do you have any idea about this error : [DOM] Found 2 elements with non-unique id #inputUser When i visit the coin page where we can add coin it shows in the console

charnasol commented 6 years ago

We have the coins added but the wallets do not show... And can outside API's be plugged is as a way of adding coins?

charnasol commented 6 years ago

Can anyone answer why wallet address does not show if we added a btc related coin?

jonasess commented 6 years ago

Hello . i set up the daemon is there any way to confirm that it's connected with the board? And how to show the wallets address?

tzman89 commented 6 years ago

@charnasol Check your bitcoin.conf and see if you have included server=1, deamon=1 and txindex=1 Those are for allowing RPC commands and transactions.

@jonasess Just add coin to exchange and click on test json in admin panel and it will show you the balance if it's connected.

jonasess commented 6 years ago

@tzman89 these are the lines exist in the btcatom.conf rpcuser=testuseratome rpcpassword=testpassword rpcport=7332 server=1 daemon=1 listen=1 and i ran the daemon on my server by typing the comand ./atom (let's say my server ip address is 199.87.90.15)

in open trade i put these information RPC address : http://199.87.90.15 :7332 rpcuser=testuseratome rpcpassword=testpassword

but still am getting same error problem with request: connect ECONNREFUSED 199.87.90.15 :7332

jonasess commented 6 years ago

Also anyone has any idea about this error?

Error: listen EADDRINUSE :::40080 at Object.exports._errnoException (util.js:1020:11) at exports._exceptionWithHostPort (util.js:1043:20) at Server._listen2 (net.js:1262:14) at listen (net.js:1298:10) at Server.listen (net.js:1394:5) at Object. (/root/opentrade/server/main.js:31:31) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12)

vitorgamer58 commented 6 years ago

something is using port 40080, try using another port or giving a sudo reboot to restart your VPS.