Gaserd - startups, programming, betting, trading

Hello, my name is Sergey and I create startups, like esport and programming.
Last time i’am creating startups in betting, trading.

twitter vk instagram telegram telegram blog
Goose Trade - твой пропуск в мир трейдинга и инвестиций

Топ 5 сервисов, если вы решили разобраться в Акциях.

Если решили разобраться как торговать и надо ли оно вам, то тогда этот топ поможет тебе.

Finviz

Финвиз является древним сервисом, в котором собрано все что нужно для уже устоявшегося трейдера, который воротит большими деньгами, остальным там будет пока сложно разобраться.

Но, для нас есть вкладка – это инсайд трейдинг, в этой вкладке собраны самые топовые фонды, люди, которые торгую на рынке и делают это успешно.
https://finviz.com/insidertrading.ashx – советую иногда заглядывать и смотреть, в какую сторону смотрит рыночек.

GuruFocus 

Похожее на финвиз, но здесь есть прикольная вкладка со скринерами, где можно подобрать тот который нравится подойдет вам.
Допустим вы любите 52-недельные показатели, то там вы найдете скринер и посмотрите список акций, которые по такому можно будет купить по любимому вам отчету.

RusETF

Прикольный сайт со скринером из Московской биржи по ETF, что такое ETF? Это такая корзинка, которую за вас собрали и вы теперь вместе со всеми ей торгуете, она будет повышаться за счет того, сколько людей ей торгуют и как меняются цены в этой корзинке.

Так вот на сайте можно подобрать интересный вам индекс и спокойно в него вложиться.

Смарт лаб

Смарт-лаб, он для сильных духом, но при этом – это крутой русский форум, где если покопаться, порой находятся удивительные вещи.
Например в этой ссылке, показан список самых классных по дивидендам компаний. Круто же, купили, дивиденды получили – сидите кайфуете.

Изи инвест

Этот сервис нашел по чистой случайности, где-то на Хабре, в каких-то странных комментах, но этот сервис позволит более честнее посмотреть на портфель, понять сколько в реальности заработали, а сколько отдали за комиссию и прочее.



Дополнительным бонусом, не могу не поделиться сервисом, которым упорно занимаюсь.

Goose Trade

Здесь можно позабивать в калькулятор акции и посмотреть, сколько отдали налогов, комиссий и сколько получили на выходе, а так же посмотреть собранную мною подборку на основе простого для понимания алгоритма.

Ну и в конце, не бойтесь торговать.
Если не хотите этого делать, не торгуйте.
Если уж сели с нами в лодку, то давайте делать все красиво!

 No comments    130   1 mon   trading

How I tried to make my first script in TradingView, and now I’m making a service out of It

TradingView is a very cool platform, but for me it is a little big and sometimes cumbersome, so I started to build something of my own over time, where I could build my own cool community.

And I called it GooseTrade is a service that shows the most interesting stocks on the market right now, as well as find out whether to buy them now based on a simple EMA algorithm.

What is an EMA ?

It will be easier to give you a link right away — https://www.investopedia.com/terms/e/ema.asp

What script did it all start with?

https://ru.tradingview.com/script/g5znCUyD-emas-min-max-3-5-8-10-12-15-35-40-50-60/

This is my script on TW which just describes the work of this algorithm. I saw a bit of positive in the direction of this algorithm, not much,but there is. After that, I decided that I should write something of my own, but what?

I interviewed several people who trade and identified the need to *find * stocks that are worth buying. Hence, the idea of making a list of interesting promotions was born.

People spend a lot of hours every week searching for the very stock that they would like to buy, I do it for them, if you want to ask me how I’m looking, I can tell you-this is the EMA (with all the tricks) + simple technical analysis to weed out some slag that has not yet matured.

Now the service has:

  • subscribe to the news service, I send out every day updates that I made and the results of the previous day
  • promotion schedule, a schedule that contains all the most important parameters for you
  • list of the most interesting shares, this is a list of the shares that I found using my algorithm

What do I use for searching ?

The algorithm I have already told you, and from the technical side it is a bundle of Alpaca APi + Yahoo Finance. In the future, I want to introduce several brokers for trading directly on my site.

What are your next plans ?

Now I am preparing a very large update, it will be connected to a neural network that I want to train and build into the service so that you can see the price that may be in the future. For this, of course, I will charge a monthly fee.

Plus there is an idea with insider trading, insert a block in which you could see which of the very large players bought shares in the company you are looking for.

That’s it

That’s it, thank you and see you again, stay close to the Goose and subscribe for updates!

 No comments    133   1 mon   trading

Telegram Bot — NodeJS, Alpaca API, QuickChart

Hello everyone 👋

Github — https://github.com/Gaserd/telegram-alpaca

Today we will show you how to make a very simple Telegram bot. To do this, we will use the Node JS programming language.

I’ve already written how to install NodeJS, so just go here — https://gaserd.xyz/?go=all/how-create-stock-screener-on-node-js-ep1/

Before you start programming, let’s prepare our workplace a little.

  • creating a folder in which we will work
  • making the npm init command
  • creating a file main.js

To do this, you need to contact another bot — https://t.me/botfather enter the /new bot command and follow the instructions. as soon as you create a bot, botfather will send you the key to your bot and save it.

Now let’s open our still empty main.js and get down to business.

We will also need a certain number of npm packages, so let’s install them all at once.

npm install date-fns @alpaca/alpaca-trade-api node-fetch telegraf

A lot of packages, of course, but with them we will do things much faster.
Now let’s write some code.

const dateFns = require('date-fns')
const apiKeyId = 'PUT YOUR API KEY'
const secretKey = 'PUT YOUR SECRET KEY'
const Alpaca = require('@alpacahq/alpaca-trade-api')
const quickchart = require('quickchart-js')
const format = 'yyyy-MM-dd'
const alpaca = new Alpaca({
    keyId: apiKeyId,
    secretKey: secretKey,
    paper: true,
    usePolygon: false
})
const nodeFetch = require('node-fetch')

const BOT_TOKEN = 'PUT YOUR BOT TOKEN'
const { Telegraf } = require('telegraf')

What do we use here? If you have already met the bot for the token, then apiKeyId and secretKey may not be familiar to you, so these are the keys for the Alpaca API, thanks to which we will get quotes.

How do I get them? I’ve already written about it here — https://gaserd.xyz/?go=all/how-create-stock-screener-on-node-js-ep2-alpacaapi-date-fns-and/

As soon as you have received everything, insert your keys and continue development.
Let’s create a couple of commands for the bot and try them out:

const bot = new Telegraf(BOT_TOKEN)
bot.start((ctx) => ctx.reply('Hey, wellcome to the board! 👋 This bot is able to show easy information about the promotion that interests you'))
bot.command('about', (ctx) => {
    ctx.reply(`Hey, my name @gaserd and i create this bot, because i like programming, trading and betting. I create blog about it https://gaserd.xyz and twitter https://twitter.com/gaserdgg`)
})
bot.launch()
console.log('telegram bot start 🆙')

Launch the bot with the command node main.js in your terminal and open the bot in Telegram, enter the /about command.
Well? Did the bot answer you? Really great!

But let’s try to complicate the task, let the bot give us the latest data on the desired action.

bot.command('lastq', (ctx) => {
    const stock = getValueOfBotCommand(ctx.message.text, 'lastq')
    alpaca
        .lastQuote(stock)
        .then(data => {
            ctx.reply(`symbol - ${data.symbol}\nask price - ${data.last.askprice}\nbid price - ${data.last.bidprice}`)
        })
        .catch((e) => {
            console.log(e)
            ctx.reply('Error, pls send message @gaserd')
        })
})

Let’s run through this code and tell you what’s what.
As always, we initialize the bot’s command and set parameters for it to respond to.
What is the function of getValueOfBotCommand ? It returns the action that the person wrote from the string.

function getValueOfBotCommand(string, command) {
    return string.replace(`/${command}`, '').replace(/ /g, '')
}

Then our code requests data from the Alpaca API and returns it to the user. Launch the bot and try it!
I think you have managed it, if something doesn’t work out, write to any of my contacts.

Moving on, let’s complicate another challenge will be to change the action in the form of pictures over the last month. Cool?

`quickCharts`,`date-fns` will help us with this.

bot.command('agg', (ctx) => {
    const stock = getValueOfBotCommand(ctx.message.text, 'agg')
    let today = new Date()
    const to = dateFns.format(today, format)
    today.setMonth(today.getMonth() - 1)
    const from = dateFns.format(today, format)

    alpaca
        .getAggregates(
            stock,
            'day',
            from,
            to
        ).then(data => {
            const results = data.results
            let labels = []
            let dataChart = []
                results.map(res => {
                    labels.push(dateFns.format(res.startEpochTime, format))
                    dataChart.push(res.closePrice)
                })

            const chart = {
                chart: {
                    type: 'line',
                    data: {
                        labels: labels,
                        datasets: [{
                            label: stock,
                            data: dataChart,
                            fill: false,
                            borderColor:'green',
                            pointRadius : 0
                        }]
                    }
                }
            }

            nodeFetch('https://quickchart.io/chart/create', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(chart)
            })
                .then(res => res.json())
                .then(res => {
                    ctx.reply(res.url)
                })
                .catch(e => {
                    ctx.reply('Error, pls send message @gaserd')
                })


        })
        .catch(e => {
            console.log(e)
            ctx.reply('Error, pls send message @gaserd')
        })
})

Let’s figure out what’s going on here.

First we tell our bot to listen to the agg command, then we select two dates in the format we need, the date of today and the date a month ago, so we get the requested period of time — this is about 21 trading days.

After that, we collect data to a specific object, which we will later pass quick charts via the REST API, and then get a link to the graph that was generated.

I hope you have become a little clearer, and now what to expect, launch the bot and start playing.

That’s it, here’s the full code for your bot.

const dateFns = require('date-fns')
const apiKeyId = 'PUT YOUR API KEY'
const secretKey = 'PUT YOUR SECRET KEY'
const Alpaca = require('@alpacahq/alpaca-trade-api')
const format = 'yyyy-MM-dd'
const alpaca = new Alpaca({
    keyId: apiKeyId,
    secretKey: secretKey,
    paper: true,
    usePolygon: false
})
const nodeFetch = require('node-fetch')

const BOT_TOKEN = 'PUT YOUR BOT TOKEN'
const { Telegraf } = require('telegraf')

const bot = new Telegraf(BOT_TOKEN)
bot.start((ctx) => ctx.reply('Hey, wellcome to the board! 👋 This bot is able to show easy information about the promotion that interests you'))
bot.help((ctx) => ctx.reply(`
/lastq {stock} - this command get last quotes for the stock which you input\n
/agg {stock} - this command get aggregates info for last 1 month\n
/about - command get ingo about this bot and who developer\n`))

bot.command('about', (ctx) => {
    ctx.reply(`Hey, my name @gaserd and i create this bot, because i like programming, trading and betting. I create blog about it https://gaserd.xyz and twitter https://twitter.com/gaserdgg`)
})

bot.command('lastq', (ctx) => {
    const stock = getValueOfBotCommand(ctx.message.text, 'lastq')
    alpaca
        .lastQuote(stock)
        .then(data => {
            ctx.reply(`symbol - ${data.symbol}\nask price - ${data.last.askprice}\nbid price - ${data.last.bidprice}`)
        })
        .catch((e) => {
            console.log(e)
            ctx.reply('Error, pls send message @gaserd')
        })
})

bot.command('agg', (ctx) => {
    const stock = getValueOfBotCommand(ctx.message.text, 'agg')
    let today = new Date()
    const to = dateFns.format(today, format)
    today.setMonth(today.getMonth() - 1)
    const from = dateFns.format(today, format)

    alpaca
        .getAggregates(
            stock,
            'day',
            from,
            to
        ).then(data => {
            const results = data.results
            let labels = []
            let dataChart = []
                results.map(res => {
                    labels.push(dateFns.format(res.startEpochTime, format))
                    dataChart.push(res.closePrice)
                })

            const chart = {
                chart: {
                    type: 'line',
                    data: {
                        labels: labels,
                        datasets: [{
                            label: stock,
                            data: dataChart,
                            fill: false,
                            borderColor:'green',
                            pointRadius : 0
                        }]
                    }
                }
            }

            nodeFetch('https://quickchart.io/chart/create', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json'
                },
                body: JSON.stringify(chart)
            })
                .then(res => res.json())
                .then(res => {
                    ctx.reply(res.url)
                })
                .catch(e => {
                    ctx.reply('Error, pls send message @gaserd')
                })


        })
        .catch(e => {
            console.log(e)
            ctx.reply('Error, pls send message @gaserd')
        })
})

bot.launch()
console.log('telegram bot start 🆙')
 No comments    132   1 mon   trading   work

How create Stock Screener on Node JS? EP3 Last episode

Well, here it is the third final lesson, in which you and I will be able to get information on our Stock Market and output it to your console.

In the previous lessons, we learned how to work with the date, output it, get whether the exchange is working, and everything else, and the homework was to finish the program a little so that it showed US NY time relative to ours.

Actually, here is the answer. To start, install another package:

npm install date-fns-timezone

And let’s add the function we need right away:

const { formatToTimeZone } = require('date-fns-timezone')

Now we need to understand, and in what part at all we have NY, so there it lies in the time zone America/Toronto, so we will write:

const timeZone = 'America/Toronto'

const edtFormat = 'YYYY-MM-DD HH:mm:ss.SSS [GMT]Z (z)'
const edtDate = formatToTimeZone(new Date(), edtFormat, { timeZone })

console.log(edtDate)

Well, as always, run your script, preferably before you comment on the old lines that we do not need yet.

2020-08-05 05:28:02.261 GMT-04:00 (EDT)

Great, now we have time with our time in mind.
Let’s now output the time at which we open the exchange and the time that is relative to our current time in NY.

Well, did it work out? If suddenly something didn’t work out or you don’t understand something tweet me https://twitter.com/gaserd or email me gaserd123@gmail.com

Do you remember our code that we commented out so that we could output the code that we wrote? Let’s bring it back to life, and add something.

But before that, we will write a code that will get data on Apple shares.

const to = dateFns.format(today, format)
    today.setMonth(today.getMonth() - 3)
    const from = dateFns.format(today, format)
    const stock = 'AAPL' 

    alpaca
        .getAggregates(
            stock,
            'day',
            from,
            to
        )
        .then(data => {
            console.table(data.results)
        }).catch((e) => {
            console.log(e)
        })

I hope you made a mistake, right? This is an error due to the format we use for formatting the date, replace it with yyyy-MM-dd

Now run your program again. You may have noticed that instead of console. log we used console.table this is due to a more convenient perception of the large amount of data that we receive.

Interesting point, do you understand why we do setMonth? All in order to get data for 3 months, each month has about 21 trading days, so we set our date to 3 months ago.

Well, can you now link the input code with the data received and check whether the exchange is working?

I’ll write the ready-made code right away, but I really want you to try it yourself.

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
const date = dateFns.format(new Date(), format)
const timeZone = 'America/Toronto'

const etcFormat = 'YYYY-MM-DD HH:mm:ss.SSS [GMT]Z (z)'
const etcDate = formatToTimeZone(new Date(), etcFormat, { timeZone })

function inputStock() {
    rl.question('Input STOCK: ', (stock) => {
        let today = new Date()
        const to = dateFns.format(today, format)
        today.setMonth(today.getMonth() - 3)
        const from = dateFns.format(today, format)

        alpaca
            .getAggregates(
                stock,
                'day',
                from,
                to
            )
            .then(data => {
                const results = data.results.map(res => res.startEpochTime = dateFns.format(res.startEpochTime, format))
                console.table(data.results)
                rl.close()
                exit()
            }).catch((e) => {
                console.log(e)
                exit()
            })
    });
}

function main() {
    alpaca.getClock().then((clock) => {
        console.log(`###############################`)
        console.log(`The market is ${clock.is_open ? 'open.' : 'closed.'}`)
        alpaca.getCalendar({
            start: date,
            end: date
        }).then((calendars) => {
            console.log(`The market opened at ${calendars[0].open} and closed at ${calendars[0].close} on ${date}.`)
            console.log(`NEW YORK TIME - ${etcDate}`)
            console.log(`###############################`)
        }).then(() => {
            if (clock.is_open) {
                inputStock()
            } else {
                exit()
            }
        })
    })
}

main()

Oops, it seems like too much code at a time. But let’s try to understand.

I wrapped our previous code in functions to make it more convenient, now we have the main function main and the inputStock function that calls a request to enter the name of the Stock and then outputs data. this function should still be divided into several, but let’s not do it yet.

the main function is the entry point to the execution of our script, it checks whether the exchange is working now and if it is working, it shows historical data, if it is not working, it tells us about it.

You may have noticed another thing, it’s exit() this is a function that exits the script and stops executing it.

const { exit } = require('process')

Actually, this is all, this is a very light version of StockScreneer, then you can dive more and more into the financial world and start processing the received data, as well as do not hesitate to get data from the Alpaca API in real time.

 No comments    119   1 mon   trading   work

How create Stock Screener on Node JS? EP2 AlpacaAPI, date-fns and 🔥

Are you ready for a new challenge?

Great, because today we will work with dates and with the Alpaca API and try to find out if the exchange is working now.

Let’s start with something new and add an NPM package that will allow us to work with dates in a more convenient way.

Open the terminal and write:

npm install date-fns

Work with Date

What is the date-fns? Yes read directly on the package page – https://date-fns.org/

Now let’s connect it at the beginning of our file, who guessed how, try it yourself, and then look at the following code.

const dateFns = require('date-fns')

Great, let’s now try to output today’s date.

console.log(new Date())

Oh Yes, don’t forget to comment on our code, which relates to the question about Input STOCK. How is this done? Just wrap the code in /* CODE */

Here is an example:

/*
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

rl.question('Input STOCK: ', (stock) => {
        console.log(`You choose stock: ${stock}`)
        rl.close()
});
*/

Now we should only have this code with you:

const readline = require('readline')
const dateFns = require('date-fns')

console.log(new Date())

And run it, if you forgot how, just enter the command in the terminal:

node main.js

If you have any questions or something went wrong, just tweet me https://twitter.com/gaserdgg or email me gaserd123@gmail.com

I see something like this in my terminal:

2020-08-04T08:33:28.769Z

It’s not the most convenient form to read the date, is it? Let’s come up with a format for the date.
Let it be yyyy-MM-dd HH:mm:ss

So we will write:

const format = `yyyy-MM-dd HH:mm:ss` 
const today = new Date()

And we’ll also make a variable for today’s date.

Now let’s do a little trick, print our date in the format we need.

console.log(dateFns.format(today, format))

Now run your script, how about it? Cool!

Install Alpaca API

Ready for something more complex? I believe in you.
It’s time for us to get busy and check whether the exchange is working. In my examples, I will use AlpacaAPI – a special API for working with the stock market and trading algorithms.

To start, go to https://alpaca.markets/ and sign up, we only need to generate a key for your work right now.

Go to the Paper Trading API and you will see a button where you can generate a key for yourself.
Now add these keys to our code, we will need them.

const apiKeyId = 'PUT API KEY HERE'
const secretKey = 'PUT SECRET KEY HERE'

Just don’t forget to insert your keys here.

Now let’s install the package for the Alpaca API

npm install @alpacahq/alpaca-trade-api

And as always, we’ll add it to our code.

const Alpaca = require('@alpacahq/alpaca-trade-api')

const alpaca = new Alpaca({
    keyId: apiKeyId,
    secretKey: secretKey,
    paper: true,
    usePolygon: false
})

If you are at this moment, something is unclear or you have something that does not work, just tweet me https://twitter.com/gaserdgg or email me gaserd123@gmail.com

Let’s now try to get the state of the exchange, find out whether it works now or not.

alpaca
.getClock()
.then((clock) => {
    console.log(`The market is ${clock.is_open ? 'open.' : 'closed.'}`)
})

And try to execute the command, well? In my time zone, the exchange is not working yet, so I get this response:

2020-08-04 11:55:39
The market is closed.

But we would also like to know when the exchange is working, so that we know at what point it is time to start trading.

const date = dateFns.format(today, format)
alpaca.getCalendar({
    start: date,
    end: date
}).then((calendars) => {
    console.log(calendars)
})

Let’s run our script and get something like this answer:

[
  {
    date: '2020-08-04',
    open: '09:30',
    close: '16:00',
    session_open: '0700',
    session_close: '1900'
  }
]
The market is closed.

Great, let’s now edit our code a little and put it out in full.

const readline = require('readline')
const dateFns = require('date-fns')
const format = `yyyy-MM-dd HH:mm:ss`
const today = new Date()
const apiKeyId = 'PUT YOU API KEY'
const secretKey = 'PUT YOU SECRET KEY'
const Alpaca = require('@alpacahq/alpaca-trade-api')
const alpaca = new Alpaca({
    keyId: apiKeyId,
    secretKey: secretKey,
    paper: true,
    usePolygon: false
})
const date = dateFns.format(today, format)

alpaca
.getClock()
.then((clock) => {
    console.log(`The market is ${clock.is_open ? 'open.' : 'closed.'}`)
})
.then(() => alpaca.getCalendar({
    start: date,
    end: date
}))
.then((calendars) => {
    console.log(`The market opened at ${calendars[0].open} and closed at ${calendars[0].close} on ${date}.`)
})

/*
const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

rl.question('Input STOCK: ', (stock) => {
        console.log(`You choose stock: ${stock}`)
        rl.close()
});
*/

Great! You have managed and now I have a small task for you.

Most likely, not everyone lives in NY and just like me have a time offset relative to the NY exchange, so it would be nice to transfer your time to NY time.

Task:
learn how to translate your current time to NY time and output it.
Hint:
you will need to look in the date-fns-timezone package
You can send your code to me anywhere, I will check each one and give you my feedback.

Thank you for reading my little episodes! In the next lesson, we will start getting data for the campaign we set.

 1 comment    110   1 mon   trading

How create Stock Screener on Node JS? EP1

Hello everyone

Today we will start a small series of lessons in which we will understand what it is Node.js.
I don’t like boring lessons, I suggest you go straight into battle.

Let’s set ourselves the following tasks:

  • install NodeJS and NPM
  • create your first script
  • learn how to get a string from the terminal
  • learn how to work with dates
  • get data from the Alpaca API based on the line we entered in the terminal, namely, find data on Stock

Simply put, we will make a very easy Stock Market Checker with you, at the same time we can earn money if we find a correlation between the current price and previous prices.

Install NodeJS & NPM

First of all, let’s install NodeJS, all the information that we need to install is here:
https://nodejs.org/en/

Nothing complicated, click the big green button, download the installer and that’s it.
Was it difficult? Great, you are already halfway there, because with the installation of NodeJS, NPM comes as a gift.

If you have any questions about the installation or something went wrong, just tweet me https://twitter.com/gaserdgg or email me gaserd123@gmail.com

To understand that everything works, let’s open the terminal and run the command:

node -v

In my case, it is shown that this version of the v12.18.1

Oh, you don’t know what a terminal is? This is how you will communicate with the computer, but without the help of a special UI that you see every day.

I will ask you if you have never used the terminal, Google what it is, take into account your operating system.

Let’s check again whether we have NPM with you, have you already guessed how?

npm -v

Again, if something doesn’t work, don’t be afraid to write to me.

Now let’s move on to creating your first script, here we will also stop a little, because you will need to choose a code editor, I will not go long and tell you, just download VSCode and do not suffer.

https://code.visualstudio.com/

Downloaded it? So we go further.

Open your code editor, since I work with VSCode.
Let’s create a workspace where we can create. Go to VSCode and create a folder, call it StockScreener

Now let’s open the terminal, for this purpose in VSCode there is a separate line in the menu, which is called Terminal – > New Terminal , it will open the terminal with the path to your folder. Conveniently.

Let’s initialize our NPM, if you haven’t read what NPM is yet, I’ll tell you, especially for those who have played MMORPG World of Warcraft, NPM is Addons for your code that other developers write, so you don’t have to write anything with your own hands, by the way, you can help them write these Addons.

Let’s enter the command

npm init

At this stage, you can not fill in anything yet, NPM will fill in everything itself, it is not important for us now, the main thing is not to forget to enter YES.

Create your first script

Great! Now let’s create our first script. Create a file with the name main.js

Maybe it’s time to write something and see how it works?
Let’s write something standard, but with a little tuning.

console.log(`Hello, I'm StockScreneer`)

Now open the terminal and run the command

node main.js

Beauty? High? Cool!
Now we would like the terminal to send something to us in the same way as NPM, we answered something to it, and our program remembered it.

For this purpose, there is a readline in NodeJS, which means something to you right now, but let me show you how it works.

Let’s write this code. You can delete the old one.

const readline = require('readline')

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

rl.question('Input STOCK: ', (stock) => {
    console.log(`You choose stock: ${stock}`)
    rl.close()
});

It’s not clear yet is it? Okay, let’s get this straight.

Our first line

const readline = require('readline')

Here we declared a variable, said she was now going to be our reader of the lines of badass.

The following

const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

We told our program that we have some interface for processing the string that we will write in the terminal.

And after

rl.question('Input STOCK: ', (stock) => {
    console.log(`You choose stock: ${stock}`)
    rl.close()
});

We ask a question to our terminal and want to get an answer, and when we get it, we close our question and output the answer.

It seems nothing complicated, but while you are most likely scared by the lack of understanding of all sorts of const, interface, require and other things, I honestly want to omit these points, I want you to enjoy the moment when the program works and it knows how to do something.

At this stage, you can experiment a little, for example, try entering other questions and output a different answer. Try it, programming is a constant experiment.

Have you played enough? Going further?

And then we will go a little later, I want you to play with this code and try different pribludy for it.

The next block will be soon and we will work with the dates in it and will output whether our exchange is working today and how long we still have to wait before opening.

If you want to read about development in trading, betting or other gambling things, then subscribe to my blog <3

Good luck and have fun!

 No comments    130   1 mon   trading

How I have collected 600 users on my list and am preparing to launch the producthunt

Hello everyone! Today I would like to tell you how I spent a small launch and gathered 600 users before I released on producthunt.

I love different communities, so I’ll tell you more about the list that I always use for small launches.

Use it always!

  • twitter
  • indie hackers
  • facebook
  • reddit (although my posts after 50 upvotes are constantly banned)
  • telegram chats
  • slack makers-kitchen
  • news.ycombinator

And I will show you how many people eventually transferred and from what source.

As a result, I received 97 clicks from reddit (while collecting about 80 devices in different threads), with news.ycombinator passed 12 people, the rest did not give much.

There were also direct visits to the site 508, most likely some of them from the slack community.

Now I’ll show you my sheet:
https://gaserd.xyz/socialtrading/index.html

 No comments    182   1 mon   growth   list   startups   trading

who i am 😂

Hello everyone!

My name is Sergey and I live in Russia, for the last 5 years I have been working in development and management, creating my own startups and attracting investment in them.

Here is a list of where I worked and what I did.

name status link description
Aviasales not work https://aviasales.ru Web Developer Mobile Version (web), PWA, Ads
Trading View not work https://tradingview.com Product Manager Mobile
Vkontakte not work https://vk.com Tech Evangelist
Handsales not work https://handsales.ru CEO, developer
Magma frozen https://magma.gg CEO, developer

If you speak Russian language you can see video with me or turn on english subtitles

For 5 years, I have also performed at more than 20 hackathons and meetups as a speaker.
Audiences ranged from 20 to 500 people.

In General, this is probably all you need to know about me.

​I have also written a lot of small services and startups, but I will tell you about them another time.

My social link:

https://twitter.com/gaserdgg
https://instagram.com/gaserd
https://facebook.com/leroyse

 No comments    293   2 mon   about me   startups   work

My Newsletter

Do you want to be one of the first to receive interesting news about development in trading and betting? Subscribe, we will grow with you together