![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
five-bells-trader
Advanced tools
A reference implementation of the Five Bells Trader API
You can see the trader in action as part of the five-bells-demo
!
To run the trader as a standalone server, follow these directions.
Note: You need two five-bells-ledger
instances to trade between.
git clone https://github.com/intertrader/five-bells-trader.git
cd five-bells-trader
npm install
npm start
TRADER_BIND_IP
(default: 0.0.0.0
) IP that Five Bells Trader will bind to.TRADER_PORT
(default: 4000
) Port that Five Bells Trader will listen on.TRADER_HOSTNAME
(default: [your hostname]) Publicly visible hostname. This is important for things like generating globally unique IDs. Make sure this is a hostname that all your clients will be able to see. The default should be fine for local testing.TRADER_PUBLIC_PORT
(default: $PORT
) Publicly visible port. You can set this if your public port differs from the listening port, e.g. because the trader is running behind a proxy.TRADER_PUBLIC_HTTPS
(default: ''
) Whether or not the publicly visible instance of Five Bells Trader is using HTTPS.TRADING_PAIRS
(default: []
) Pairs to trade on, ex.[
[
'USD@http://ledger1.example',
'EUR@http://ledger2.example'
],[
'EUR@http://ledger2.example',
'USD@http://ledger1.example'
]
]
TRADER_CREDENTIALS
(default: {}
) Trader's login credentials, ex.{
"<ledger_uri>": {
"account_uri": "...",
"username": "...",
"password": "..."
}
}
TRADER_DEBUG_AUTOFUND
(default: ''
) Debug feature which uses corresponding ledger debugTRADER_FX_SPREAD
(default: 0.002
=.2%) How much of a spread to add on top of the reference exchange rate. This determines the trader's margin.TRADER_MIN_MESSAGE_WINDOW
(default: 1
) Minimum time the trader wants to budget for getting a message to the ledgers its trading on. In seconds.TRADER_MAX_HOLD_TIME
(default: 10
) Maximum duration the trader is willing to place funds on hold while waiting for the outcome of a transaction. In seconds.This project can be run in a Docker container.
docker run -it --rm -e PORT=4000 quay.io/ripple/five-bells-trader
Breaking down that command:
-it
Run Five Bells Trader in an interactive terminal.--rm
Delete container when it's done running.-e PORT=4000
Set the trader's port to 4000. This is just an example for how to set a config option.FAQs
Five Bells trader reference implementation
The npm package five-bells-trader receives a total of 2 weekly downloads. As such, five-bells-trader popularity was classified as not popular.
We found that five-bells-trader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.