Pythonic Tutorial Part 12-16

in #programming4 years ago (edited)

Pythonic on GitHub
Pythonic Tutorial Part 1 - 6
Pythonic Tutorial Part 7 - 11

12. Send E-Mail Element



Send E-Mail element in the element bar



Send E-Mail Element

The E-Mail element allows you to send a mail programmatically. Keep in mind that your mail provider must support this (on gmail you need to enable Less secure app access. The E-Mail element is restricted to secure connections only.

You can specify the subject and message text based on the input. The input must be a dictionary (formatted like in the screenshot). Alternatively, the input can be used as the message text or as an attachment (string or binary).

13. REST Element



REST element in the element bar



REST Element

The REST element does a simple HTTP (GET) query. This element can only process JSON string which are then converted to a Python dictionary.

E.g. https://www.bitstamp.net/api/ticker/



REST element with debug output enabled

14. Binance Scheduler



Binance Scheduler element in the element bar



Binance Scheduler Element

The Binance Scheduler ekement synchronizes subsequent elements with the time of the Binance server. Regardless of your local system time, the Binance Scheduler ensures that you get always the latest marked data.

Scenario:
,,Real" Binance time 15:52, time on your machine: 15:59. If you would have setup a standard scheduler to query marked data every full hour, you would query 53 minutes old data on 16:00. The latest marked data would be available on the Binance serve when on your local machine it is 16:07.

To prevent such a scenario, you should use the Binance Scheduler element to synchronize subsequent elements with the Binance time. You can also apply an offset (e.g. +10s) to ensure that the latest data is available on the server when you start your query.

15. Binance OHLC Query



Binance OHLC Query element in the element bar



Binance OHLC Query Element

With the Binance OHLC Query element you can download market data from the Binance server. You have to specify the currency pair and the desired interval. The output is a Pandas Dataframe with named columns (screenshot).

16. Binance Order Element



Binance Order element in the element bar



Binance Order Element

The Binance Order element lets you place an order. Use it only if you are 100% sure that your configuration will work as expected.

Prices, quantities and types can be configured depending of the order type. Input values have precedence. It is also worth to take a look on the source code of this element.

To create a Binance API key, follow these instructions.

Sort:  

Congratulations @avenwedde! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 10 posts. Your next target is to reach 20 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 61372.42
ETH 2928.56
USDT 1.00
SBD 3.66