Comments (83)
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/
from opentrade.
The first registered user have access to admin panel where it is possible to add coins. Please read new readme file
from opentrade.
Readme updated. Try it now
from opentrade.
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
from opentrade.
the new readme? ok, I did a pull request on Branch Test updating the redme for a dependency that was missing.
from opentrade.
I took your changes into account.
from opentrade.
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.
from opentrade.
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
from opentrade.
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.
from opentrade.
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"
from opentrade.
You need to register domain and A-record for your domain should point to your IP address (address from where you will send emails)
from opentrade.
I created a .tk domain and did DNS right, I changed it to [email protected] 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
from opentrade.
Seems problem in your vps hosting provider. Some providers are blocks outgoing smtp traffic to port 25.
from opentrade.
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.
from opentrade.
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?
from opentrade.
Whenever am trying to regester a new account i get Bad Request Something wrong ((
from opentrade.
you need to setup recaptcha. Without it exchange will not work.
from opentrade.
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
from opentrade.
the recaptcha doesn't work at all . as i said i tried many secret key of google recaptcha but still am getting same issues
from opentrade.
recaptcha problem solved
from opentrade.
All right, I was able to set up, but I got an error trying to add a coin.
from opentrade.
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?
from opentrade.
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
from opentrade.
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 .
from opentrade.
I think the entire domain has to point to the VPS where opentrade will stay, try to ping my vps: bolsotrade.tk
from opentrade.
i found the configuration file . the server was configured using nginx
from opentrade.
I confess that I am not very good with configuration of this type, but the opentrade works independently of the NGIX or Apache
from opentrade.
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.
from opentrade.
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
from opentrade.
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
from opentrade.
done it worked thanks
from opentrade.
what does RPC means? RPC address ,RPC user,RPC password?
from opentrade.
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
from opentrade.
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.
from opentrade.
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
from opentrade.
Guys what does RPC means? and using RCP means we don't need daemon of the coin?
from opentrade.
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
from opentrade.
Thanks i will check it
from opentrade.
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.
from opentrade.
There is strongly recommended to use rpc password for security reasons
from opentrade.
But not needed to list coins or add markets.
from opentrade.
putz, my goal would be to only add cryptonight coins ..
from opentrade.
putz, my goal would be to only add cryptonight coins ..
from opentrade.
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
from opentrade.
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?
from opentrade.
Can anyone answer why wallet address does not show if we added a btc related coin?
from opentrade.
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?
from opentrade.
@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.
from opentrade.
@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
from opentrade.
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)
from opentrade.
something is using port 40080, try using another port or giving a sudo reboot
to restart your VPS.
from opentrade.
@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
from opentrade.
Thanks it's working now
from opentrade.
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?
from opentrade.
@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?
from opentrade.
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?
from opentrade.
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.
from opentrade.
@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?
from opentrade.
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
from opentrade.
Okay thank you
from opentrade.
it will be like this
from opentrade.
@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
from opentrade.
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
from opentrade.
@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 .
from opentrade.
When you setup your deamon and add Bitcoin to admin panel, bitcoin wont show in market if it's added as main pair
from opentrade.
@tzman89 Okay i got you thanks for the help
from opentrade.
@3s3s Would you have any tips on what file I should modify so opentrade would become compatible with cryptonight coins?
from opentrade.
@vitorgamer58 i added cryptonote (Galaxycash ... etc) successfully on the board like any other coin (btc ... etc).
Did you try to add it first?
from opentrade.
@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
from opentrade.
@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...
from opentrade.
@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.
from opentrade.
@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
from opentrade.
@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: )
from opentrade.
@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.
from opentrade.
@vitorgamer58 True it's not supported . does it mean you have to add more codes or just simple changes to be supported?
from opentrade.
I have no idea but I will never know if I do not try
from opentrade.
But if it is not supported how did you add a cryptonote?
from opentrade.
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
from opentrade.
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
from opentrade.
bitcoin-cli encrypwallet yourpassword
password you put will be your passphrase
You can get all commands by typing bitcoin-cli help
from opentrade.
@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.
from opentrade.
from opentrade.
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
from opentrade.
Related Issues (20)
- the users balance become negative when admin function presses function in last trade menu HOT 2
- RPC ERROR Cannot POST HOT 1
- Help with account balances HOT 1
- Exchange wallet file size too big, how to replace wallet? HOT 1
- Help, PoS scrypt coin withdraw does not work? HOT 5
- coin RPC is not returned data HOT 1
- Support role assigned but no menu HOT 2
- New coin doesn't save
- Withdraw error
- New Layout Available (See Demo) HOT 1
- Fix balance error
- Exchange behind Apache or Nginx HOT 1
- Is https://mc-ex.multicoins.org/ is open source ? HOT 1
- This page isnβt working Cannot GET /
- accountsserver main.js error: unexpected init db error 1 HOT 4
- Database error HOT 1
- Database folder empty HOT 7
- Security Patches from ShorelineCrypto Open Sourced HOT 1
- const DOMAIN = 'localhost'
- Not able to locate sqlite DB files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opentrade.