Kraken api - get token with python

Kraken api - get token with python an example of how you can generate a WebSocket authentication token using Python for Kraken's API: ```python import time import base64 import hashlib import hmac import urllib.request import json # Replace with your Kraken API public and private keys api_key = 'YOUR_API_PUBLIC_KEY' api_secret = 'YOUR_API_PRIVATE_KEY' # API endpoint and parameters api_path = '/0/private/GetWebSocketsToken' api_nonce = str(int(time.time() * 1000)) api_post = 'nonce=' + api_nonce # Create the SHA256 hash api_sha256 = hashlib.sha256(api_nonce.encode('utf-8') + api_post.encode('utf-8')).digest() # Create the HMAC signature api_hmac = hmac.new(base64.b64decode(api_secret), api_path.encode('utf-8') + api_sha256, hashlib.sha512) api_signature = base64.b64encode(api_hmac.digest()) # Create the request api_request = urllib.request.Request('https://api.kraken.com' + api_path, api_post.encode('utf-8')) ap

Linux - Rsyncd install - Centos8

 

Linux - Rsyncd install - Centos8

 

1. 설치

yum install rsync rsync-daemon -y

yum install rsync rsync-daemon -y

 

2. 환경 설정

[root@node1 svc]# vi /etc/rsyncd.conf

# /etc/rsyncd.conf

uid = 1000
gid = 1000

max connections = 20
timeout 600

hosts allow = 192.168.56.0/24

[SRCS]
  path = /svc/srcs
  comment = System Install Source Pub
  use chroot = yes
  read only = yes


[WEB_APP]
  comment = WEB SERVICE SRC
  path = /svc/web_app
  use chroot = yes
  read only = no

 

3. rsyncd 기동

# Rsync  상태 확인 한다

    systemctl status rsyncd

# Rsync  상태 확인
[root@node1 svc]# systemctl status rsyncd

rsyncd.service - fast remote file copy program daemon
Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; disabled; vendor preset: disabled)
Active: inactive (dead)

 

# Rsync  자동 실행 설정# Rsync를 시스템 시작시 자동 실행하도록 설정한다.

     # systemctl enable rsyncd

 

# Rsync를 시스템 시작시 자동 실행하도록 설정한다.

[root@node1 svc]# systemctl enable rsyncd
Created symlink /etc/systemd/system/multi-user.target.wants/rsyncd.service → /usr/lib/systemd/system/rsyncd.service.

 

# Rsyncd 를 실행한다.
    systemctl start rsyncd

 

 

[root@node1 svc]# systemctl start rsyncd

# Rsyncd 를 실행 상태를 확인한다. 
    
systemctl status rsyncd

[root@node1 svc]# systemctl status rsyncd
rsyncd.service - fast remote file copy program daemon
Loaded: loaded (/usr/lib/systemd/system/rsyncd.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2020-02-23 05:38:23 EST; 5s ago
Main PID: 7226 (rsync)
Tasks: 1 (limit: 17979)
Memory: 296.0K
CGroup: /system.slice/rsyncd.service
mq7226 /usr/bin/rsync --daemon --no-detach
Feb 23 05:38:23 node1.im.com systemd[1]: Started fast remote file copy program daemon.
Feb 23 05:38:23 node1.im.com rsyncd[7226]: params.c:Parameter() - Ignoring badly formed line in con>
Feb 23 05:38:23 node1.im.com rsyncd[7226]: rsyncd version 3.1.3 starting, listening on port 873

 

# 중지와 실행으로 작동 상태를 점검한다.

# 중지 명령을 실행
[root@node1 svc]# systemctl stop rsyncd

# 실행 명령을 실행
[root@node1 svc]# systemctl start rsyncd

 

 

[참조]

http://blog.naver.com/couplewith/221821470069

 

Centos8 : Rsyncd 설치와 selinux 문제 해결법

#Rsyncd #Selinux #firewall-cmd​​ Rsyncd 설치와 selinux 문제 해결법Centos8에 Rsync 를 설치하는...

blog.naver.com

 

https://couplewith.tistory.com/167

 

Linux - Rsyncd 설치와 selinux 문제 해결법 (Centos8)

Linux - Rsyncd 설치와 selinux 문제 해결법 (Centos8) #Rsyncd #Selinux #firewall-cmd #setsebool -P rsync_full_access 1 1. Rsyncd 설치와 selinux 문제 해결법 Centos8에 Rsync 를 설치하는데 아래와 같은 에러를 만났다. 예전 같

couplewith.tistory.com

 

댓글

이 블로그의 인기 게시물

SSL/TLS 인증서 오류를 해결- 리눅스명령모음 - SSL certificate problem

(truffle 환경 설정) 스마트 계약 배포 와 truffle deploy 오류 해결 - Error: Could not find artifacts for SimpleStorage from any sources

자기주권 신원 (SSI Self-Sovereign Identity) 인증의 발전 그리고 정보 민주화 (Information Democratization)