Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ujhin/upbit-client
Upbit(업비트) Cryptocurrency Exchange Open API Client of Multi-Programming Language Support
https://github.com/ujhin/upbit-client
api api-client api-connector api-rest bitcoin client crypto cryptocurrency cryptocurrency-exchanges exchange http-client market-data open-api python sdk trading ujhin upbit upbit-api upbit-client
Last synced: about 3 hours ago
JSON representation
Upbit(업비트) Cryptocurrency Exchange Open API Client of Multi-Programming Language Support
- Host: GitHub
- URL: https://github.com/ujhin/upbit-client
- Owner: uJhin
- License: mit
- Created: 2021-01-07T06:56:26.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T10:35:31.000Z (5 months ago)
- Last Synced: 2024-12-27T22:15:31.677Z (about 3 hours ago)
- Topics: api, api-client, api-connector, api-rest, bitcoin, client, crypto, cryptocurrency, cryptocurrency-exchanges, exchange, http-client, market-data, open-api, python, sdk, trading, ujhin, upbit, upbit-api, upbit-client
- Language: C++
- Homepage: https://ujhin.github.io/upbit-client-docs/
- Size: 1.73 MB
- Stars: 55
- Watchers: 4
- Forks: 44
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Upbit Client
Upbit(업비트) Cryptocurrency Exchange API Client
### Description
Upbit(업비트) Cryptocurrency Exchange Open API Client of Multi-Programming Language Support### Swagger Generated Support Languages
- [Python](https://github.com/uJhin/upbit-client/tree/main/swg_generated/python/)
- [C++](https://github.com/uJhin/upbit-client/tree/main/swg_generated/cpp)
- [CSharp](https://github.com/uJhin/upbit-client/tree/main/swg_generated/csharp/)
- [Objective-C](https://github.com/uJhin/upbit-client/tree/main/swg_generated/objective-c)
- [Java](https://github.com/uJhin/upbit-client/tree/main/swg_generated/java/)
- [JavaScript](https://github.com/uJhin/upbit-client/tree/main/swg_generated/)
- [PHP](https://github.com/uJhin/upbit-client/tree/main/swg_generated/php/SwaggerClient-php/)
- [Android](https://github.com/uJhin/upbit-client/tree/main/swg_generated/android)
- [Kotlin](https://github.com/uJhin/upbit-client/tree/main/swg_generated/)
- [Go](https://github.com/uJhin/upbit-client/tree/main/swg_generated/go/)
- [Lua](https://github.com/uJhin/upbit-client/tree/main/swg_generated/lua)
- [R](https://github.com/uJhin/upbit-client/tree/main/swg_generated/r)
- [Rust](https://github.com/uJhin/upbit-client/tree/main/swg_generated/rust)
- [Scala](https://github.com/uJhin/upbit-client/tree/main/swg_generated/scala)### Install
- `pip` command
```console
pip install upbit-client
```
- `git` command
```console
git clone https://github.com/uJhin/upbit-client.git
```### Quick Start
#### REST Client
- Check Your API Keys
```python
# /v1/api_keysfrom upbit.client import Upbit
access_key = "Your Access Key"
secret_key = "Your Secret Key"client = Upbit(access_key, secret_key)
api_keys = client.APIKey.APIKey_info()
print(api_keys['result'])
```- Buy Currency
```python
# /v1/ordersfrom upbit.client import Upbit
access_key = "Your Access Key"
secret_key = "Your Secret Key"client = Upbit(access_key, secret_key)
order = client.Order.Order_new(
market='KRW-BTC',
side='bid',
volume='0.1',
price='3000000',
ord_type='limit'
)
print(order['result'])
```- Sell Currency
```python
# /v1/ordersfrom upbit.client import Upbit
access_key = "Your Access Key"
secret_key = "Your Secret Key"client = Upbit(access_key, secret_key)
order = client.Order.Order_new(
market='KRW-BTC',
side='ask',
volume='0.1',
price='3000000',
ord_type='limit'
)
print(order['result'])
```#### WebSocket Client
- Get Real-Time Ticker
```python
# Using WebSocketimport json
import asynciofrom upbit.websocket import UpbitWebSocket
# Definition async function
async def ticker(sock, payload):
async with sock as conn:
await conn.send(payload)
while True:
recv = await conn.recv()
data = recv.decode('utf8')
result = json.loads(data)
print(result)sock = UpbitWebSocket()
currencies = ['KRW-BTC', 'KRW-ETH']
type_field = sock.generate_type_field(
type='ticker',
codes=currencies,
)
payload = sock.generate_payload(
type_fields=[type_field]
)event_loop = asyncio.get_event_loop()
event_loop.run_until_complete( ticker(sock, payload) )
```### Donation