This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import matplotlib.pyplot as plt | |
import pandas as pd # For displaying the table | |
# Fetch Data | |
response = requests.get("https://api.btcturk.com/api/v2/ticker") | |
data = response.json() | |
# Parse Data for TRY pairs, keeping them unchanged | |
try_pairs_data = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import matplotlib.pyplot as plt | |
# Fetch Data | |
response = requests.get("https://api.btcturk.com/api/v2/ticker") | |
data = response.json() | |
# Gets snapshot information about the last trade (tick), best bid/ask and 24h volume. | |
# Parse Data for TRY pairs only, excluding USDT pairs | |
pairs_data = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import time | |
import sqlite3 | |
# Initialize and connect to the SQLite database | |
conn = sqlite3.connect('btcturk_volume_data.db') | |
c = conn.cursor() | |
# Create the table if it doesn't exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from datetime import datetime, timedelta | |
# Calculate the start and end timestamps for the last two weeks | |
end_time = datetime.now() | |
start_time = end_time - timedelta(days=90) | |
# Convert to Unix timestamp in seconds | |
start_timestamp = int(start_time.timestamp()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from datetime import datetime, timedelta | |
# Calculate the start and end timestamps for the last two weeks | |
end_time = datetime.now() | |
start_time = end_time - timedelta(days=94) | |
# Convert to Unix timestamp in seconds | |
start_timestamp = int(start_time.timestamp()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import matplotlib.pyplot as plt | |
# Fetch Data | |
response = requests.get("https://api.btcturk.com/api/v2/ticker") | |
data = response.json() | |
#Gets snapshot information about the last trade (tick), best bid/ask and 24h volume. | |
# Parse Data for USDT pairs only, excluding USDTTRY | |
pairs_data = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import matplotlib.pyplot as plt | |
# Fetch Data | |
response = requests.get("https://api.btcturk.com/api/v2/ticker") | |
data = response.json() | |
#Gets snapshot information about the last trade (tick), best bid/ask and 24h volume. | |
# Parse Data for USDT pairs only, excluding USDTTRY | |
pairs_data = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
import hashlib | |
class Node: | |
def __init__(self, left, right, value: str, content) -> None: | |
self.left = left | |
self.right = right | |
self.value = value | |
self.content = content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
# Set up the variables | |
spot_rates = { | |
1: 0.055, | |
2: 0.06, | |
3: 0.0625, | |
4: 0.065, | |
5: 0.07, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: BUSL-1.1 | |
pragma solidity ^0.8.17; | |
contract BasicBankV2 { | |
mapping(address => uint256) public balances; | |
/// @notice deposit ether into the contract | |
/// @dev it should work properly when called multiple times | |
function addEther() external payable { |
NewerOlder