-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ CREATE_MODEL_TICKER=True | |
|
||
VAPID_CLAIMS='[email protected]' | ||
VAPID_PRIVATE_KEY='private_key.pem' | ||
|
||
COINMARKETCAL_API_KEY='your_coin_market_cal_api_key' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,7 @@ CREATE_MODEL_TICKER=False | |
# Must change these values | ||
VAPID_CLAIMS='[email protected]' | ||
VAPID_PRIVATE_KEY='path/to/private_key' | ||
|
||
# Register and grab your CoinMarketCal API KEY in https://coinmarketcal.com | ||
# and set it here. | ||
COINMARKETCAL_API_KEY='your_coin_market_cal_api_key' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
__author__ = "Paulo Antunes" | ||
__copyright__ = "Copyright 2018, XTCryptoSignals" | ||
__credits__ = [ | ||
"Paulo Antunes", | ||
] | ||
__license__ = "GPL" | ||
__maintainer__ = "Paulo Antunes" | ||
__email__ = "[email protected]" | ||
|
||
|
||
from mongoengine import ( | ||
IntField, | ||
StringField, | ||
DictField, | ||
ListField, | ||
DateField, | ||
BooleanField, | ||
) | ||
from xtcryptosignals.common.models import DocumentValidation | ||
|
||
|
||
class Event(DocumentValidation): | ||
title = StringField(required=True) | ||
tickers = ListField(StringField(required=True)) | ||
categories = ListField(StringField(required=True)) | ||
can_occur_before = BooleanField(required=True) | ||
json_id = IntField(required=True) | ||
json = DictField(required=True) | ||
happening_on = DateField(required=True) | ||
|
||
meta = { | ||
"collection": "event", | ||
"indexes": [("-happening_on",), ], | ||
"ordering": ["-happening_on"], | ||
} |