Skip to content

Instantly share code, notes, and snippets.

@vincentwyshan
Created January 6, 2013 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentwyshan/4465826 to your computer and use it in GitHub Desktop.
Save vincentwyshan/4465826 to your computer and use it in GitHub Desktop.
namespace py cadaapi.stock
include "struct.thrift"
struct Stock {
1: required string ticker,
2: required i32 status,
3: required struct.CadaDateTime timestamp
}
struct TableStock {
1: required list<string> head,
2: required list<Stock> body,
3: optional struct.CadaTranslation translation
}
struct RatingByReport {
1: required string ticker,
2: required i32 cnt_institution,
3: optional list<string> strong_buy,
4: optional list<string> buy,
5: optional list<string> neutral,
6: optional list<string> sell,
7: optional list<string> strong_sell,
8: optional i32 cnt_maintain,
9: optional i32 cnt_upgrade,
10: optional i32 cnt_downgrade,
11: optional i32 avg_score,
12: optional string adjustment
}
struct TableRatingByReport {
1: required list<string> head,
2: required list<RatingByReport> body,
3: optional struct.CadaTranslation translation
}
# *************** China ************************
service china{
void ping(),
TableStock listed(1:struct.CadaDateTime date),
TableRatingByReport rating_byreport(1:string ticker) throws (1:struct.CadaInternalError error),
string test_transport()
}
# ***************** Hong kong ********************
service hongkong{
void ping()
}
# ***************** Taiwan ********************
service taiwan{
void ping()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment