Skip to content

API to generate candlestick chart data for any time period based on transactions data

Notifications You must be signed in to change notification settings

dev-farbod/candel-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

candel-maker

API to generate candlestick chart data for any time period based on transactions data

Installation

clone repo

git clone https://github.com/dev-farbod/candel-maker.git

clone to directori

cd candel-maker

Use the package manager npm to install dependencies.

npm install

run server

node index.js

server will be run on localhost:5050

API refrenc

make candels

  POST /candel
Parameter Type Description default
transactions array Required. array of your transactions
time_frame number requested time frame (minute) 1
output_timestamp_type string (s / ms) choose type of candels timestamp,second or milisecond s

Example

{
	"transactions":[
		{
			"timestamp":"1644394447",
			"price":"30",
			"amount":2
		},
			{
			"timestamp":1644394437,
			"price":20,
			"amount":2
		}
		],
		"time_frame":"2",
    "output_timestamp_type":"ms"
}

response

{
    "status": true,
    "msg": "",
    "candels": [
        {
            "open": 20,
            "close": 30,
            "high": 30,
            "low": 20,
            "time": 1644394447000,
            "volume": 4
        }
    ]
}

About

API to generate candlestick chart data for any time period based on transactions data

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published