crunchbase4 0.1.1 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +5 -0
  3. data/CHANGELOG.md +66 -0
  4. data/Gemfile.lock +1 -1
  5. data/README.md +392 -40
  6. data/crunchbase4.gemspec +2 -2
  7. data/lib/crunchbase.rb +30 -1
  8. data/lib/crunchbase/autocompletes/client.rb +75 -0
  9. data/lib/crunchbase/client.rb +4 -0
  10. data/lib/crunchbase/deleted_entities/client.rb +69 -0
  11. data/lib/crunchbase/entities/client.rb +24 -12
  12. data/lib/crunchbase/models.rb +10 -1
  13. data/lib/crunchbase/models/address.rb +36 -0
  14. data/lib/crunchbase/models/autocomplete_entity.rb +25 -0
  15. data/lib/crunchbase/models/concerns/entity.rb +53 -0
  16. data/lib/crunchbase/models/concerns/mappings.rb +37 -0
  17. data/lib/crunchbase/models/deleted_entity.rb +26 -0
  18. data/lib/crunchbase/models/event_appearance.rb +39 -0
  19. data/lib/crunchbase/models/fund.rb +43 -0
  20. data/lib/crunchbase/models/ipo.rb +48 -0
  21. data/lib/crunchbase/models/job.rb +42 -0
  22. data/lib/crunchbase/models/organization.rb +9 -0
  23. data/lib/crunchbase/models/ownership.rb +39 -0
  24. data/lib/crunchbase/models/principal.rb +112 -0
  25. data/lib/crunchbase/utilities/autocomplete.rb +51 -0
  26. data/lib/crunchbase/utilities/deleted_entities.rb +47 -0
  27. data/lib/crunchbase/utilities/entity_endpoints.rb +58 -24
  28. data/lib/crunchbase/utilities/request.rb +28 -11
  29. data/lib/crunchbase/utilities/response.rb +1 -1
  30. data/lib/crunchbase/utilities/search_endpoints.rb +22 -0
  31. data/lib/crunchbase/utilities/search_query_parameters.rb +64 -0
  32. data/lib/crunchbase/utilities/veriables.rb +335 -0
  33. data/lib/crunchbase/version.rb +1 -1
  34. metadata +23 -7
  35. data/lib/crunchbase/models/entity.rb +0 -32
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative '../errors'
4
+
3
5
  module Crunchbase
4
6
  # Utilities
5
7
  module Utilities
@@ -15,8 +17,8 @@ module Crunchbase
15
17
  # limit: Number of rows to return. Default is 100, min is 1, max is 100.
16
18
 
17
19
  # Lookup an Organization or single card
18
- def organization(entity_id, card_id: nil)
19
- lookup_for('organization', entity_id, card_id)
20
+ def organization(entity_id, **card_args)
21
+ lookup_for('organization', entity_id, card_args)
20
22
  end
21
23
 
22
24
  # Lookup Organization's all cards
@@ -25,53 +27,83 @@ module Crunchbase
25
27
  end
26
28
 
27
29
  # Lookup a Person or single card
28
- def person(entity_id, card_id: nil)
29
- lookup_for('person', entity_id, card_id)
30
+ def person(entity_id, **card_args)
31
+ lookup_for('person', entity_id, card_args)
30
32
  end
31
33
 
32
34
  # Lookup Person's all cards
33
- def person_cards(entity_id)
34
- entities('person', entity_id).fetch_cards
35
+ def person_cards(entity_id, cards: [])
36
+ entities('person', entity_id).fetch_cards(cards)
35
37
  end
36
38
 
37
39
  # Lookup a Funding Round or single card
38
- def funding_round(entity_id, card_id: nil)
39
- lookup_for('funding_round', entity_id, card_id)
40
+ def funding_round(entity_id, **card_args)
41
+ lookup_for('funding_round', entity_id, card_args)
40
42
  end
41
43
 
42
44
  # Lookup Funding Round's all cards
43
- def funding_round_cards(entity_id)
44
- entities('funding_round', entity_id).fetch_cards
45
+ def funding_round_cards(entity_id, cards: [])
46
+ entities('funding_round', entity_id).fetch_cards(cards)
45
47
  end
46
48
 
47
49
  # Lookup an Acquisition or Single card
48
- def acquisition(entity_id, card_id: nil)
49
- lookup_for('acquisition', entity_id, card_id)
50
+ def acquisition(entity_id, **card_args)
51
+ lookup_for('acquisition', entity_id, card_args)
50
52
  end
51
53
 
52
54
  # Lookup Acquisition's all card
53
- def acquisition_cards(entity_id)
54
- entities('acquisition', entity_id).fetch_cards
55
+ def acquisition_cards(entity_id, cards: [])
56
+ entities('acquisition', entity_id).fetch_cards(cards)
55
57
  end
56
58
 
57
59
  # Lookup an Investment or Single card
58
- def investment(entity_id, card_id: nil)
59
- lookup_for('investment', entity_id, card_id)
60
+ def investment(entity_id, **card_args)
61
+ lookup_for('investment', entity_id, card_args)
60
62
  end
61
63
 
62
64
  # Lookup Investment's all card
63
- def investment_cards(entity_id)
64
- entities('investment', entity_id).fetch_cards
65
+ def investment_cards(entity_id, cards: [])
66
+ entities('investment', entity_id).fetch_cards(cards)
65
67
  end
66
68
 
67
69
  # Lookup an PressReference or Single card
68
- def press_reference(entity_id, card_id: nil)
69
- lookup_for('press_reference', entity_id, card_id)
70
+ def press_reference(entity_id, **card_args)
71
+ lookup_for('press_reference', entity_id, card_args)
70
72
  end
71
73
 
72
74
  # Lookup PressReference's all card
73
- def press_reference_cards(entity_id)
74
- entities('press_reference', entity_id).fetch_cards
75
+ def press_reference_cards(entity_id, cards: [])
76
+ entities('press_reference', entity_id).fetch_cards(cards)
77
+ end
78
+
79
+ # Lookup an Ipo or Single card
80
+ def ipo(entity_id, **card_args)
81
+ lookup_for('ipo', entity_id, card_args)
82
+ end
83
+
84
+ # Lookup Ipo's all card
85
+ def ipo_cards(entity_id, cards: [])
86
+ entities('ipo', entity_id).fetch_cards(cards)
87
+ end
88
+
89
+ # Lookup an fund or Single card
90
+ def fund(entity_id, **card_args)
91
+ lookup_for('fund', entity_id, card_args)
92
+ end
93
+
94
+ # Lookup fund's all card
95
+ def fund_cards(entity_id, cards: [])
96
+ entities('fund', entity_id).fetch_cards(cards)
97
+ end
98
+
99
+ # Lookup an fund or Single card
100
+ def ownership(entity_id, **card_args)
101
+ lookup_for('ownership', entity_id, card_args)
102
+ end
103
+
104
+ # Lookup fund's all card
105
+ def ownership_cards(entity_id, cards: [])
106
+ entities('ownership', entity_id).fetch_cards(cards)
75
107
  end
76
108
 
77
109
  private
@@ -80,11 +112,13 @@ module Crunchbase
80
112
  Crunchbase::Entities::Client.new(entity_id, entity_type)
81
113
  end
82
114
 
83
- def lookup_for(entity_type, entity_id, card_id)
115
+ def lookup_for(entity_type, entity_id, **card_args)
84
116
  kobject = entities(entity_type, entity_id)
117
+
118
+ card_id = card_args&.delete(:card_id)
85
119
  return kobject.fetch if card_id.nil?
86
120
 
87
- kobject.cards(card_id)
121
+ kobject.cards(card_id, card_args)
88
122
  end
89
123
  end
90
124
  end
@@ -9,23 +9,28 @@ require_relative '../errors'
9
9
  module Crunchbase
10
10
  # Utilities
11
11
  module Utilities
12
- # API Request
12
+ # Key Reminder
13
+ #
14
+ # entity_id must be provided in the request
15
+ # entity_id can be the uuid or the permalink of the entity
16
+ # you can pass your API key in the request's header if you do not want to pass the API key in the URL
13
17
  module Request
14
18
  module_function
15
19
 
20
+ # Autocompletes endpoint
21
+ def get(uri, *args)
22
+ fetch_request(uri, *args)
23
+ end
24
+
25
+ def deleted(uri, *args)
26
+ fetch_request(uri, *args)
27
+ end
28
+
16
29
  # Entity endpoints
17
30
  #
18
31
  # https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Entity/get_entities_organizations__entity_id_
19
32
  def entity(uri, *args)
20
- response = Faraday.new(url: BASE_URI, headers: headers) do |faraday|
21
- faraday.adapter Faraday.default_adapter
22
- faraday.response :json
23
- faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
24
- end.get(uri, *args)
25
-
26
- return response.body if response.status == 200
27
-
28
- raise Error, response.reason_phrase
33
+ fetch_request(uri, *args)
29
34
  end
30
35
 
31
36
  # Search endpoints
@@ -41,11 +46,23 @@ module Crunchbase
41
46
 
42
47
  return response.body if response.status == 200
43
48
 
44
- raise Error, response.reason_phrase
49
+ raise Error, response.body[0]['message']
45
50
  end
46
51
 
47
52
  private
48
53
 
54
+ def fetch_request(uri, *args)
55
+ response = Faraday.new(url: BASE_URI, headers: headers) do |faraday|
56
+ faraday.adapter Faraday.default_adapter
57
+ faraday.response :json
58
+ faraday.response :logger, ::Logger.new(STDOUT), bodies: true if debug_mode?
59
+ end.get(uri, *args)
60
+
61
+ return response.body if response.status == 200
62
+
63
+ raise Error, response.status == 400 ? response.body[0]['message'] : response.body['error']
64
+ end
65
+
49
66
  def debug_mode?
50
67
  Crunchbase.config.debug || false
51
68
  end
@@ -17,7 +17,7 @@ module Crunchbase
17
17
  attribute_names.delete(attribute_name)
18
18
  hash_datas = response&.dig(attribute_name)
19
19
 
20
- values = hash_datas&.map { |k, v| v if %w[uuid permalink].include?(k) }&.compact || []
20
+ values = hash_datas&.map { |k, v| v if %w[uuid permalink value].include?(k) }&.compact || []
21
21
  dynamic_define_method(object, attribute_name, values)
22
22
  hash_datas&.keys&.each do |key|
23
23
  next unless %w[uuid permalink].include?(key)
@@ -1,10 +1,28 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative './search_query_parameters'
4
+
3
5
  module Crunchbase
4
6
  # Utilities
5
7
  module Utilities
6
8
  # All Searches API endpoint
7
9
  module SearchEndpoints
10
+ include SearchQueryParameters
11
+
12
+ # Example to searching organizations
13
+ #
14
+ # {
15
+ # scope_name: 'organization',
16
+ # date: '2020-05-05',
17
+ # field_ids: %w[name website permalink],
18
+ # sort: 'desc'
19
+ # before_id: 'uuid'
20
+ # after_id: 'uuid'
21
+ # }
22
+ def recent_updates(args)
23
+ searches(query_parameters(args), args[:scope_name]).searches
24
+ end
25
+
8
26
  # For Searches
9
27
  def search_organizations(raw_data)
10
28
  searches(raw_data, 'organization').searches
@@ -14,6 +32,10 @@ module Crunchbase
14
32
  searches(raw_data, 'funding_round').searches
15
33
  end
16
34
 
35
+ def search_people(raw_data)
36
+ searches(raw_data, 'person').searches
37
+ end
38
+
17
39
  private
18
40
 
19
41
  def searches(raw_data, scope_name)
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Utilities
5
+ module Utilities
6
+ # All Searches Query Parameters
7
+ module SearchQueryParameters
8
+ module_function
9
+
10
+ # https://app.swaggerhub.com/apis-docs/Crunchbase/crunchbase-enterprise_api/1.0.1#/Search/post_searches_people
11
+ #
12
+ # Search Query Parameters
13
+ #
14
+ # field_ids: array of field_id strings
15
+ # Fields to include as columns in the search result entities
16
+ # query: Search query to perform on the designated entity
17
+ # order: (field_id, sort, nulls)
18
+ # Order in which the search results should be returned
19
+ # limit: integer
20
+ # Number of rows to return. Default is 100, min is 1, max is 1000.
21
+ # before_id: string($uuid)
22
+ # Used to paginate search results to the previous page.
23
+ # before_id should be the uuid of the first item in the current page. May not be provided simultaneously with after_id.
24
+ # after_id: string($uuid)
25
+ # Used to paginate search results to the next page.
26
+ # after_id should be the uuid of the last item in the current page. May not be provided simultaneously with before_id.
27
+ def query_parameters(args)
28
+ params = {
29
+ 'field_ids' => %w[
30
+ uuid
31
+ created_at
32
+ updated_at
33
+ ] + (args[:field_ids] || []).uniq,
34
+ 'order' => [
35
+ {
36
+ 'field_id' => 'updated_at',
37
+ 'sort' => (args[:sort] || 'desc'),
38
+ 'nulls' => 'last'
39
+ }
40
+ ],
41
+ 'limit' => args[:limit] || 1000
42
+ }
43
+
44
+ unless args[:date].nil?
45
+ params.merge!(
46
+ 'query' => [
47
+ {
48
+ 'type' => 'predicate',
49
+ 'field_id' => 'updated_at',
50
+ 'operator_id' => 'gte',
51
+ 'values' => [
52
+ args[:date]
53
+ ]
54
+ }
55
+ ]
56
+ )
57
+ end
58
+ params.merge!('before_id' => args[:before_id]) unless args[:before_id].nil?
59
+ params.merge!('after_id' => args[:after_id]) unless args[:after_id].nil?
60
+ params
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,335 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Crunchbase
4
+ # Utilities
5
+ module Utilities
6
+ # Veriables
7
+ module Veriables
8
+ # Description of operators
9
+ QUERY_OPERATORS = {
10
+ 'blank' => 'Blank',
11
+ 'eq' => 'Equal',
12
+ 'not_eq' => 'Not equal',
13
+ 'gt' => 'Greater than',
14
+ 'gte' => 'Greater than or equal',
15
+ 'lt' => 'Less than',
16
+ 'lte' => 'Less than or equal',
17
+ 'starts' => 'Starts',
18
+ 'contains' => 'Contains',
19
+ 'between' => 'Between',
20
+ 'includes' => 'Includes',
21
+ 'not_includes' => 'Does not include',
22
+ 'includes_all' => 'Includes all',
23
+ 'not_includes_all' => 'Does not include all'
24
+ }.freeze
25
+
26
+ COMPANY_TYPES = {
27
+ 'for_profit' => 'For Profit',
28
+ 'non_profit' => 'Non-profit'
29
+ }.freeze
30
+
31
+ FACET_IDS = {
32
+ 'company' => 'Company',
33
+ 'investor' => 'Investor',
34
+ 'school' => 'School'
35
+ }.freeze
36
+
37
+ IPO_STATUS = {
38
+ 'delisted' => 'Delisted',
39
+ 'private' => 'Private',
40
+ 'public' => 'Public'
41
+ }.freeze
42
+
43
+ FUNDING_STAGES = {
44
+ 'early_stage_venture' => 'Early Stage Venture',
45
+ 'ipo' => 'IPO',
46
+ 'late_stage_venture' => 'Late Stage Venture',
47
+ 'm_and_a' => 'M&A',
48
+ 'private_equity' => 'Private Equity',
49
+ 'seed' => 'Seed'
50
+ }.freeze
51
+
52
+ FUNDING_TYPES = {
53
+ 'angel' => 'Angel',
54
+ 'convertible_note' => 'Convertible Note',
55
+ 'corporate_round' => 'Corporate Round',
56
+ 'debt_financing' => 'Debt Financing',
57
+ 'equity_crowdfunding' => 'Equity Crowdfunding',
58
+ 'grant' => 'Grant',
59
+ 'initial_coin_offering' => 'Initial Coin Offering',
60
+ 'non_equity_assistance' => 'Non-equity Assistance',
61
+ 'post_ipo_debt' => 'Post-IPO Debt',
62
+ 'post_ipo_equity' => 'Post-IPO Equity',
63
+ 'post_ipo_secondary' => 'Post-IPO Secondary',
64
+ 'pre_seed' => 'Pre-Seed',
65
+ 'private_equity' => 'Private Equity',
66
+ 'product_crowdfunding' => 'Product Crowdfunding',
67
+ 'secondary_market' => 'Secondary Market',
68
+ 'seed' => 'Seed',
69
+ 'series_a' => 'Series A',
70
+ 'series_b' => 'Series B',
71
+ 'series_c' => 'Series C',
72
+ 'series_d' => 'Series D',
73
+ 'series_e' => 'Series E',
74
+ 'series_f' => 'Series F',
75
+ 'series_g' => 'Series G',
76
+ 'series_h' => 'Series H',
77
+ 'series_i' => 'Series I',
78
+ 'series_j' => 'Series J',
79
+ 'series_unknown' => 'Venture - Series Unknown',
80
+ 'undisclosed' => 'Undisclosed'
81
+ }.freeze
82
+
83
+ CURRENCY_ENUM = %w[
84
+ AED AFN ALL AMD ANG AOA ARS AUD AWG AZN BAM BBD BDT BGN BHD
85
+ BIF BMD BND BOB BRL BSD BTN BWP BYN BYR BZD CAD CDF CHF CLF
86
+ CLP CNY COP CRC CUC CUP CVE CZK DJF DKK DOP DZD EGP ERN ETB
87
+ EUR FJD FKP GBP GEL GHS GIP GMD GNF GTQ GYD HKD HNL HRK HTG
88
+ HUF IDR ILS INR IQD IRR ISK JMD JOD JPY KES KGS KHR KMF KPW
89
+ KRW KWD KYD KZT LAK LBP LKR LRD LSL LTL LVL LYD MAD MDL MGA
90
+ MKD MMK MNT MOP MRO MUR MVR MWK MXN MYR MZN NAD NGN NIO NOK
91
+ NPR NZD OMR PAB PEN PGK PHP PKR PLN PYG QAR RON RSD RUB RWF
92
+ SAR SBD SCR SDG SEK SGD SHP SKK SLL SOS SRD SSP STD SVC SYP
93
+ SZL THB TJS TMT TND TOP TRY TTD TWD TZS UAH UGX USD UYU UZS
94
+ VEF VND VUV WST XAF XAG XAU XBA XBB XBC XBD XCD XDR XOF XPD
95
+ XPF XPT YER ZAR ZMK ZMW xts
96
+ ].freeze
97
+
98
+ DATE_PRECISIONS = %w[none year month day].freeze
99
+
100
+ LAYOUT_IDS = {
101
+ 'default' => 'Default Layout',
102
+ 'investor' => 'Investor Layout',
103
+ 'school' => 'School Layout'
104
+ }.freeze
105
+
106
+ NUM_EMPLOYEES_ENUM = {
107
+ 'c_00001_00010' => '1-10',
108
+ 'c_00011_00050' => '11-50',
109
+ 'c_00051_00100' => '51-100',
110
+ 'c_00101_00250' => '101-250',
111
+ 'c_00251_00500' => '251-500',
112
+ 'c_00501_01000' => '501-1000',
113
+ 'c_01001_05000' => '1001-5000',
114
+ 'c_05001_10000' => '5001-10000',
115
+ 'c_10001_max' => '10001+'
116
+ }.freeze
117
+
118
+ OPERATING_STATUS = {
119
+ 'active' => 'Active',
120
+ 'closed' => 'Closed'
121
+ }.freeze
122
+
123
+ PROGRAM_TYPES = {
124
+ 'on_site' => 'On-Site',
125
+ 'online' => 'Online'
126
+ }.freeze
127
+
128
+ REVENUE_RANGES = {
129
+ 'r_00000000' => 'Less than $1M',
130
+ 'r_00001000' => '$1M to $10M',
131
+ 'r_00010000' => '$10M to $50M',
132
+ 'r_00050000' => '$50M to $100M',
133
+ 'r_00100000' => '$100M to $500M',
134
+ 'r_00500000' => '$500M to $1B',
135
+ 'r_01000000' => '$1B to $10B',
136
+ 'r_10000000' => '$10B+'
137
+ }.freeze
138
+
139
+ SCHOOL_METHODS = {
140
+ 'on_compus' => 'On Campus',
141
+ 'online' => 'Online',
142
+ 'online_and_on_campus' => 'Online and On Campus'
143
+ }.freeze
144
+
145
+ SCHOOL_PROGRAMS = {
146
+ 'bootcamp' => 'Bootcamp',
147
+ 'community_college' => 'Community College',
148
+ 'four_year_university' => 'Four Year University',
149
+ 'graduate_university' => 'Graduate University',
150
+ 'high_school' => 'High School',
151
+ 'trade_school' => 'Trade School',
152
+ 'two_year_university' => 'Two Year University'
153
+ }.freeze
154
+
155
+ SCHOOL_TYPES = {
156
+ 'for_profit_private' => 'Private',
157
+ 'non_profit_private' => 'Private (Non-Profit)',
158
+ 'public' => 'Public'
159
+ }.freeze
160
+
161
+ STATUS = {
162
+ 'closed' => 'Closed',
163
+ 'ipo' => 'IPO',
164
+ 'operating' => 'Operating',
165
+ 'was_acquired' => 'Was Acquired'
166
+ }.freeze
167
+
168
+ STOCK_EXCHANGE_SYMBOLS = {
169
+ 'adx' => 'ADX - Abu Dhabi Securities Exchange',
170
+ 'afx' => 'AFX - Afghanistan Stock Exchange',
171
+ 'altx' => 'ALTX - ALTX East Africa Exchange',
172
+ 'amex' => 'AMEX - American Stock Exchange',
173
+ 'ams' => 'AMS - Euronext Amsterdam',
174
+ 'amx' => 'AMX - Armenia Securities Exchange',
175
+ 'asce' => 'ASCE - Abuja Securities and Commodities Exchange',
176
+ 'asx' => 'ASX - Australian Securities Exchange',
177
+ 'ath' => 'ATH - Athens Stock Exchange',
178
+ 'bcba' => 'BCBA - Buenos Aires Stock Exchange',
179
+ 'bdp' => 'BDP - Budapest Stock Exchange',
180
+ 'belex' => 'BELEX - Belgrade Stock Exchange',
181
+ 'ber' => 'BER - Berliner Börse',
182
+ 'bfb' => 'BFB - Baku Stock Exchange',
183
+ 'bit' => 'BIT - Italian Stock Exchange',
184
+ 'bkk' => 'BKK - Thailand Stock Exchange',
185
+ 'blse' => 'BLSE - Banja Luka Stock Exchange',
186
+ 'bme' => 'BME - Madrid Stock Exchange',
187
+ 'bmv' => 'BMV - Mexican Stock Exchange',
188
+ 'bom' => 'BOM - Bombay Stock Exchange',
189
+ 'brvm' => 'BRVM - Regional Securities Exchange SA',
190
+ 'bse' => 'BSE - Bulgarian Stock Exchange',
191
+ 'bse_lb' => 'BSE - Beirut Stock Exchange',
192
+ 'bsse' => 'BSSE - Bratislava Stock Exchange',
193
+ 'bsx' => 'BSX - Bermuda Stock Exchange',
194
+ 'bvb' => 'BVB - Bucharest Stock Exchange',
195
+ 'bvc' => 'BVC - Colombian Stock Exchange',
196
+ 'bvfb' => 'BVFB - Belarusian Currency and Stock Exchange',
197
+ 'bvm' => 'BVM - Montevideo Stock Exchange',
198
+ 'bvmf' => 'B3 - Brazil Stock Exchange and OTC Market',
199
+ 'bvmt' => 'BVMT - Tunis Stock Exchange',
200
+ 'bx' => 'BX - Berne Stock Exchange',
201
+ 'cas' => 'CAS - Casablanca Stock Exchange',
202
+ 'cise' => 'CISE - Channel Islands Stock Exchange',
203
+ 'cnsx' => 'CNSX - Canadian National Stock Exchange',
204
+ 'col' => 'COL - Colombo Stock Exchange',
205
+ 'cph' => 'CPH - Copenhagen Stock Exchange',
206
+ 'cse' => 'CSE - Canadian Securities Exchange',
207
+ 'cse_cy' => 'CSE - Cyprus Stock Exchange',
208
+ 'csx' => 'CSX - Cambodia Securities Exchange',
209
+ 'cve' => 'TSX-V - Toronto TSX Venture Exchange',
210
+ 'dfm' => 'DFM - Dubai Financial Market',
211
+ 'dse' => 'DSE - Dhaka Stock Exchange',
212
+ 'dsx' => 'DSX - Douala Stock Exchange',
213
+ 'dus' => 'DUS - Börse Düsseldorf',
214
+ 'ebr' => 'EBR - Euronext Brussels',
215
+ 'egx' => 'EGX - Egypt Stock Exchange',
216
+ 'eli' => 'ELI - Euronext Lisbon',
217
+ 'epa' => 'EPA - Euronext Paris',
218
+ 'etr' => 'ETR - Deutsche Börse XETRA',
219
+ 'eurex' => 'EUREX - Eurex Exchange',
220
+ 'fra' => 'FRA - Frankfurt Stock Exchange',
221
+ 'fwb' => 'FWB - Börse Frankfurt Stock Exchange',
222
+ 'gha' => 'GHA - Ghana Stock Exchange',
223
+ 'gsx' => 'GSX - Georgian Stock Exchange',
224
+ 'gsx_gi' => 'GSX - Gibraltar Stock Exchange',
225
+ 'hel' => 'HEL - Helsinki Stock Exchange',
226
+ 'hkg' => 'HKG - Hong Kong Stock Exchange',
227
+ 'hnx' => 'HNX - Hanoi Stock Exchange',
228
+ 'hose' => 'HOSE - Ho Chi Minh Stock Exchange',
229
+ 'ice' => 'ICE - Iceland Stock Exchange',
230
+ 'idx' => 'IDX - Indonesia Stock Exchange',
231
+ 'iex' => 'IEX - Investors Exchange',
232
+ 'ifb' => 'IFB - Iran Fara Bourse',
233
+ 'ime' => 'IME - Iran Mercantile Exchange',
234
+ 'irenex' => 'IRENEX - Iran Energy Exchange',
235
+ 'ise' => 'ISE - Irish Stock Exchange',
236
+ 'ist' => 'IST - Istanbul Stock Exchange',
237
+ 'isx' => 'ISX - Iraq Stock Exchange',
238
+ 'jp' => 'JP - Japan Exchange',
239
+ 'jsc' => 'JSC - Belarusian Currency and Stock Exchange',
240
+ 'jse' => 'JSE - Johannesburg Stock Exchange',
241
+ 'jse_jam' => 'JSE - Jamaica Stock Exchange',
242
+ 'kase' => 'KASE - Kazakhstan Stock Exchange',
243
+ 'klse' => 'KLSE - Malaysia Stock Exchange',
244
+ 'kosdaq' => 'KOSDAQ - Korean Securities Dealers Automated Quotations',
245
+ 'krx' => 'KRX - Korea Stock Exchange',
246
+ 'kse' => 'KSE - Kuwait Stock Exchange',
247
+ 'lje' => 'LJE - Ljubljana Stock Exchange',
248
+ 'lse' => 'LSE - London Stock Exchange',
249
+ 'lsm' => 'LSM - Libyan Stock Market',
250
+ 'lsx' => 'LSX - Lao Securities Exchange',
251
+ 'luse' => 'LuSE - Lusaka Securities Exchange',
252
+ 'luxse' => 'LuxSE - Luxembourg Stock Exchange',
253
+ 'mal' => 'MAL - Malta Stock Exchange',
254
+ 'mcx' => 'MCX - Multi Commodity Exchange of India',
255
+ 'meff' => 'MEFF - Mercado Spanish Financial Futures Market',
256
+ 'mnse' => 'MNSE - Montenegro Stock Exchange',
257
+ 'moex' => 'MOEX - Moscow Exchange',
258
+ 'mse' => 'MSE - Metropolitan Stock Exchange',
259
+ 'mse_md' => 'MSE - Moldova Stock Exchange',
260
+ 'mse_mk' => 'MSE - Macedonian Stock Exchange',
261
+ 'msei' => 'MSEI - Metropolitan Stock Exchange of India',
262
+ 'msm' => 'MSM - Muscat Securities Market',
263
+ 'mun' => 'MUN - Börse München',
264
+ 'nasdaq' => 'NASDAQ',
265
+ 'nbo' => 'NSE - Nairobi Securities Exchange',
266
+ 'neeq' => 'NEEQ - National Equities Exchange and Quotations',
267
+ 'nepse' => 'NEPSE - Nepal Stock Exchange',
268
+ 'nex' => 'NEX - NEX Exchange',
269
+ 'ngm' => 'NGM - Nordic Growth Market Exchange',
270
+ 'nig' => 'NIG - Nigerian Stock Exchange',
271
+ 'notc' => 'NOTC - Norwegian OTC',
272
+ 'npex' => 'NPEX - NPEX Stock Exchange',
273
+ 'nse' => 'NSE - National Stock Exchange of India',
274
+ 'nsx' => 'NSX - National Stock Exchange of Australia',
275
+ 'nyse' => 'NYSE - New York Stock Exchange',
276
+ 'nysearca' => 'NYSEARCA - NYSE Arca',
277
+ 'nysemkt' => 'NYSEAMERICAN - NYSE American',
278
+ 'nze' => 'NZE - New Zealand Stock Exchange',
279
+ 'ose' => 'OSE - Oslo Stock Exchange',
280
+ 'otcbb' => 'OTCBB - FINRA OTC Bulletin Board',
281
+ 'otcpink' => 'OTC Pink',
282
+ 'otcqb' => 'OTCQB',
283
+ 'otcqx' => 'OTCQX',
284
+ 'pdex' => 'PDEx - Philippine Dealing Exchange',
285
+ 'pex' => 'PEX - Palestine Exchange',
286
+ 'pfts' => 'PFTS - PFTS Ukraine Stock Exchange',
287
+ 'pomsox' => 'POMSoX - Port Moresby Stock Exchange',
288
+ 'prg' => 'PRA - Prague Stock Exchange',
289
+ 'pse' => 'PSE - Philippine Stock Exchange',
290
+ 'psx' => 'PSX - Pakistan Stock Exchange',
291
+ 'qse' => 'QSE - Qatar Stock Exchange',
292
+ 'rfb' => 'RFB - Riga Stock Exchange',
293
+ 'rse' => 'RSE - Rwanda Stock Exchange',
294
+ 'rsebl' => 'RSEBL - Royal Securities Exchange of Bhutan',
295
+ 'sase' => 'SASE - Sarajevo Stock Exchange',
296
+ 'sbx' => 'SBX - BX Swiss',
297
+ 'sehk' => 'SEHK - The Stock Exchange of Hong Kong',
298
+ 'sem' => 'SEM - Stock Exchange of Mauritius',
299
+ 'sgbv' => 'SGBV - Algiers Stock Exchange',
300
+ 'sgx' => 'SGX - Singapore Stock Exchange',
301
+ 'six' => 'SIX - SIX Swiss Exchange',
302
+ 'spbex' => 'SPBEX - Saint Petersburg Stock Exchange',
303
+ 'spse' => 'SPSE - South Pacific Stock Exchange',
304
+ 'sse' => 'SSE - Shanghai Stock Exchange',
305
+ 'ssx' => 'SSX - Sydney Stock Exchange',
306
+ 'sto' => 'STO - Stockholm Stock Exchange',
307
+ 'stu' => 'STU - Börse Stuttgart',
308
+ 'swx' => 'SWX - SIX Swiss Exchange',
309
+ 'szse' => 'SZSE - Shenzhen Stock Exchange',
310
+ 'tadawul' => 'Tadawul - Saudi Stock Exchange',
311
+ 'tal' => 'TSE - Tallinn Stock Exchange',
312
+ 'tfex' => 'TFEX - Thailand Futures Exchange',
313
+ 'tise' => 'TISE - The International Stock Exchange',
314
+ 'tlv' => 'TLV - Tel Aviv Stock Exchange',
315
+ 'tpe' => 'TWSE - Taiwan Stock Exchange',
316
+ 'tse_al' => 'TSE - Tirana Stock Exchange',
317
+ 'tse_ir' => 'TSE - Tehran Stock Exchange',
318
+ 'tsec' => 'TWO - Taiwan OTC Exchange',
319
+ 'tsx' => 'TSX - Toronto Stock Exchange',
320
+ 'ttse' => 'TTSE - Trinidad and Tobago Stock Exchange',
321
+ 'tyo' => 'TYO - Tokyo Stock Exchange',
322
+ 'use' => 'USE - Uganda Securities Exchange',
323
+ 'ux' => 'UX - Ukrainian Exchange',
324
+ 'vie' => 'VIE - Vienna Stock Exchange',
325
+ 'vmf' => 'VMF - Faroese Securities Market',
326
+ 'vse' => 'VSE - Vancouver Stock Exchange',
327
+ 'wse' => 'WSE - Warsaw Stock Exchange',
328
+ 'ysx' => 'YSX - Yangon Stock Exchange',
329
+ 'zamace' => 'ZAMACE - Zambian Commodity Exchange',
330
+ 'zse' => 'ZSE - Zimbabwe Stock Exchange',
331
+ 'zse_hr' => 'ZSE - Zagreb Stock Exchange'
332
+ }.freeze
333
+ end
334
+ end
335
+ end